亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? component.h

?? 這是一款2d游戲引擎
?? H
字號:
/*  $Id: component.h,v 1.125 2004/01/07 02:53:50 mbn Exp $
**
**  ClanLib Game SDK
**  Copyright (C) 2003  The ClanLib Team
**  For a total list of contributers see the file CREDITS.
**
**  This library is free software; you can redistribute it and/or
**  modify it under the terms of the GNU Lesser General Public
**  License as published by the Free Software Foundation; either
**  version 2.1 of the License, or (at your option) any later version.
**
**  This library is distributed in the hope that it will be useful,
**  but WITHOUT ANY WARRANTY; without even the implied warranty of
**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
**  Lesser General Public License for more details.
**
**  You should have received a copy of the GNU Lesser General Public
**  License along with this library; if not, write to the Free Software
**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
**
*/

//! clanGUI="Framework"
//! header=gui.h

#ifndef header_component
#define header_component

#if _MSC_VER > 1000
#pragma once
#endif

#include <string>

#include "../signals.h"
#include "../Core/Math/rect.h"
#include "../Core/Math/point.h"
#include "../Display/input_event.h"

//: Layout policies for CL_Component.
//- !group=GUI/Framework!
//- !header=gui.h!
enum CL_LayoutPolicy
{
	layout_minimum,
	layout_expanding,
};

class CL_GUIManager;
class CL_InputDevice;
class CL_StyleManager;
class CL_ComponentStyle;
class CL_DomElement;
class CL_Component_Generic;
class CL_ComponentManager;
class CL_Layout;

//: Component base class.
//- !group=GUI/Framework!
//- !header=gui.h!
//- <p>The component class is the base class for any component/widget/control (or
//- whatever you call it :)) in the GUI system. It is responsible for painting
//- the component, painting of any child components of it, and it receives the
//- input for a component.</p>
class CL_Component
{
//! Construction:
public:
	//: Component Constructor
	CL_Component(
		CL_Component *parent,
		CL_StyleManager *style = NULL);

	//: Component Constructor
	CL_Component(
		const CL_Rect &pos,
		CL_Component *parent,
		CL_StyleManager *style = NULL);

	//: Component Destructor
	virtual ~CL_Component();

//! Attributes:
public:
	//: Returns the client area of the component.
	CL_Component *get_client_area() const;

	//: Returns the parent component, or NULL if none.
	CL_Component *get_parent() const;

	//: Returns the root parent.
	CL_Component *get_root_parent();

	//: Returns the GUI manager that this component is attached to, or NULL if none.
	CL_GUIManager *get_gui_manager() const;

	//: Returns the style manager used by this component.
	CL_StyleManager *get_style_manager() const;

	//: Returns the width of the component.
	int get_width() const;

	//: Returns the height of the component.
	int get_height() const;

	//: Returns the components position in screen coordinates.
	CL_Rect get_screen_rect() const;

	//: Returns the position of this component.
	const CL_Rect &get_position() const;

	//: Get the minimum size of the component.
	CL_Size get_minimum_size() const;

	//: Get the maximum size of the component.
	CL_Size get_maximum_size() const;

	//: Get the preferred size of the component.
	CL_Size get_preferred_size() const;

	//: Returns the vertical size policy of the component.
	const CL_LayoutPolicy &get_vertical_policy() const;

	//: Returns the horizontal size policy of the component.
	const CL_LayoutPolicy &get_horizontal_policy() const;

	//: returns the layout for this component.
	const CL_Layout &get_layout() const;

	//: Returns true if event passing is enabled.
	bool get_event_passing() const;

	//: Returns true if the passed component is a child of this component.
	bool has_child(CL_Component *component) const;

	//: Returns the list of child components.
	const std::list<CL_Component *> &get_children() const;

	//: Returns the bounding rectangle of the component's children.
	CL_Rect get_children_rect() const;

	//: Returns the component at (pos_x, pos_y).
	//- <p>This functions searches for children recursively.
	//- NULL is returned if the point is outside the component.
	//- The component itself is returned if the component has no child at the specified point.</p>
	CL_Component *get_component_at(int pos_x, int pos_y);

	//: Returns the component that currently has the focus.
	CL_Component *get_focus() const;

	//: Returns true if component has the focus.
	bool has_focus() const;

	//: Returns true if the component can be focused.
	bool is_focusable() const;
	
	//: Returns true if the mouse is currently highlighting the component.
	bool has_mouse_over() const;

	//: Returns true if component is visible.
	bool is_visible() const;

	//: Returns true if component accepts user input.
	bool is_enabled() const;

	//: Returns true if component has mouse captured.
	bool is_mouse_captured() const;

	//: Returns the tab id of the component.
	int get_tab_id() const;

	//: Returns the component style.
	CL_ComponentStyle *get_style() const;

	//: Returns true if component is in modal state.
	bool is_modal() const;
	
	//: Returns true if component have parents which on top of gui_manager modal stack.
	//- <p>Note, only "top" of modal stack.</p>
	bool has_modal_parent() const;

	//: Returns true if the topmost flag is set.
	bool is_topmost() const;

//! Operations:
public:
	//: Set the tab id of the component.
	void set_tab_id(int id);

	//: Sets the position (relative to its parent) and size of this component.
	void set_position(const CL_Rect &new_pos);

	//: Sets the position of this component (relative to its parent).
	void set_position(int new_x, int new_y);

	//: Sets the size of this component.
	void set_size(int new_width, int new_height);

	//: Changes the width of the component.
	void set_width(int width);

	//: Changes the height of the component.
	void set_height(int height);

	//: Set the minimum size of the component.
	void set_minimum_size(const CL_Size &size);

	//: Set the maximum size of the component.
	void set_maximum_size(const CL_Size &size);

	//: Set the preferred size of the component.
	void set_preferred_size(const CL_Size &size);

	//: Set the vertical size policy of the component.
	void set_vertical_policy(const CL_LayoutPolicy &policy);

	//: Set the horizontal size policy of the component.
	void set_horizontal_policy(const CL_LayoutPolicy &policy);

	//: Set the layout for this component.
	void set_layout(const CL_Layout &layout);

	//: Enables/disables the event passing to parent.
	void set_event_passing(bool enable = true);

	//: Sets the parent of this component.
	void set_parent(CL_Component *parent);

	//: Sets the GUI manager this component is attached to.
	void set_gui_manager(CL_GUIManager *gui);

	//: Changes the visibility flag.
	void show(bool show = true);

	//: Enable/disable user input.
	void enable(bool enable = true);

	//: Enable/disable the ability to focus component.
	void set_focusable(bool focusable = true);
	
	//: Give focus to this component.
	void set_focus();

	//: Raises this component to the top of the parent component's stack. 
	//- <p>If the topmost flag is set, it will get draw before any other components. If the flag
	//- is not set, it will be draw before any other components that do not have the topmost flag
	//- set.</p>
	void raise();

	//: Lowers this component to the bottom of the parent component's stack.
	//- <p>If the topmost flag is set, it will get draw after any other components with the topmost
	//- flag set, but before any components with the flag cleared.</p>
	void lower();

	//: Capture the mouse on the currently attached GUI manager. All mouse input
	//: will be directed to this component until release_mouse() is called.
	void capture_mouse();

	//: Releases the mouse capture.
	void release_mouse();

	//: Asks the GUI to repaint itself.
	//- <p>This function doesn't redraw the GUI immidiately. Instead it raises the 
	//- update event trigger in the CL_GUIManager parent.</p>
	void update();

	//: Calls sig_begin_paint(), then sig_paint(), and finally sig_end_paint().
	void paint();

	//: Run the component as a modal component until quit() is called.
	void run();

	//: Quit the modal loop of the component.
	void quit();

	//: "Closes" this component.
	//: Hides and detaches component from parent.
	void close();

	//: Adds the specified component as a children to this component.
	//- <p>If 'delete_child' is true, the child will be deleted when the component is deleted.</p>
	void add_child(CL_Component *child, bool delete_child = false);

	//: Removes the specified child from the component.
	void remove_child(CL_Component *child);

	//: Sets a component style to the component.
	//- <p>If 'delete_style' is true, the style will be deleted when the component is deleted.</p>
	void set_style(CL_ComponentStyle *style, bool delete_style = true);

	//: Calculate a default size.
	void find_preferred_size();

	//: Returns the component with the specified tab ID.
	CL_Component *find_tab_id(int tab_id);

	//: Set the client area of the component. Not used by user - only by other components.
	void set_client_area(CL_Component *component);

	//: Sets or clears the topmost flag.
	//- <p>Components with the topmost flag set are shown above components with it cleared.</p>
	void set_topmost_flag(bool topmost);

//! Signals:
public:
	//: Update component with a new set of component options.
	CL_Signal_v1<const CL_DomElement &> &sig_set_options();

	//: Draws the component. Must be called in a
	//: begin_paint() / end_paint() session.
	CL_Signal_v0 &sig_paint();

	//: Called prior to component drawing. Sets up a cliprect and translocates
	//: coordinates accordingly to this component.
	CL_Signal_v0 &sig_begin_paint();

	//: Called after component drawing, and draws all the children.
	CL_Signal_v0 &sig_paint_children();

	//: Cleans up when component drawing is finished (cleans up cliprects and
	//: translocation stuff).
	CL_Signal_v0 &sig_end_paint();

	//: Called when any inputdevice button is pressed (keyboard, mouse, joystick, etc).
	CL_Signal_v1<const CL_InputEvent &> &sig_input_down();

	//: Called when any inputdevice button is released (keyboard, mouse, joystick, etc)
	CL_Signal_v1< const CL_InputEvent &> &sig_input_up();

	//: Called when a key is pressed on keyboard.
	CL_Signal_v1<const CL_InputEvent &> &sig_key_down();

	//: Called when a key is released on keyboard.
	CL_Signal_v1<const CL_InputEvent &> &sig_key_up();

	//: Called when a mousebutton is clicked.
	//: The CL_InputEvent contains the coordinates and which button was pressed
	CL_Signal_v1<const CL_InputEvent &> &sig_mouse_down();

	//: Called when a mousebutton is released.
	CL_Signal_v1<const CL_InputEvent &> &sig_mouse_up();

	//: Called when the mouse is moved.
	CL_Signal_v1<const CL_InputEvent &> &sig_mouse_move();

	//: Called when mouse enters the component area.
	CL_Signal_v0 &sig_mouse_enter();

	//: Called when mouse leaves the component area.
	CL_Signal_v0 &sig_mouse_leave();

	//: Called when component gains focus.
	CL_Signal_v0 &sig_got_focus();

	//: Called when component lose focus.
	CL_Signal_v0 &sig_lost_focus();

	//: Called when component is closed.
	CL_Signal_v0 &sig_close();
	
	//: Called when component is resized.
	//: The two parameters are the OLD width and height of the component.
	CL_Signal_v2<int, int> &sig_resize();

	//: Called when component is moved.
	//: The two parameters are the OLD positions of the component.
	CL_Signal_v2<int, int> &sig_move();

	//: Called when a child component is about to be added to the component.
	CL_Signal_v1<CL_Component *> &sig_child_before_add();

	//: Called when a child component is added to the component.
	CL_Signal_v1<CL_Component *> &sig_child_add();

	//: Called when a child component is about to be removed from the component.
	CL_Signal_v1<CL_Component *> &sig_child_before_remove();
	
	//: Called when a child component is removed from the component.
	CL_Signal_v1<CL_Component *> &sig_child_remove();

	//: Called when needing to convert parent coordinates into coordinates used by this component.
	//- <p>This is used in 3D guis to convert from screen coordinates to gui coordinates.
	//- (project the screen cordinates down on the plane that the gui is laying on)</p>
	CL_Signal_v2<int &, int &> &sig_transform_coords();
	
	//: Called when needing to find the minimum size of the component.
	//: Normally used by the styles.
	CL_Signal_v1<CL_Size &> &sig_get_minimum_size();

	//: Called when needing to find the maximum size of the component.
	//: Normally used by the styles.
	CL_Signal_v1<CL_Size &> &sig_get_maximum_size();

	//: Called when needing to find the preferred size of the component.
	//: Normally used by the styles.
	CL_Signal_v1<CL_Size &> &sig_get_preferred_size();

//! Implementation:
protected:
	CL_Component_Generic *impl;

	friend class CL_Component_Generic;
	friend class CL_GUIManager_Generic;
};

#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久午夜羞羞影院免费观看| 国产精品私人影院| 国产成人精品在线看| 亚洲超碰97人人做人人爱| 久久精品日韩一区二区三区| 欧美日韩你懂的| 成人动漫一区二区在线| 免费成人你懂的| 一区二区欧美视频| 国产精品网站一区| 国产亚洲欧美色| 日韩一区二区在线观看| 色乱码一区二区三区88| 成人av电影免费观看| 国产在线国偷精品产拍免费yy| 亚洲高清视频的网址| 亚洲蜜臀av乱码久久精品| 久久精品一区二区三区四区| 欧美一区二区久久久| 精品视频123区在线观看| 色综合久久久久久久久久久| 成人少妇影院yyyy| 国产一区二区三区四区五区入口| 青青草国产精品97视觉盛宴| 亚洲国产成人av网| 亚洲国产精品久久久久秋霞影院| 亚洲欧美aⅴ...| 亚洲精品久久7777| 亚洲日本va在线观看| 国产精品高潮呻吟| 国产精品国产精品国产专区不片| 国产视频视频一区| 中文字幕av免费专区久久| 亚洲国产高清不卡| 国产精品毛片无遮挡高清| 国产欧美精品在线观看| 国产日本欧洲亚洲| 国产精品久久午夜| 国产精品久久网站| |精品福利一区二区三区| 中文字幕色av一区二区三区| 亚洲欧洲精品一区二区三区 | 久久99国产精品麻豆| 日韩成人精品在线观看| 免费观看日韩电影| 精品亚洲aⅴ乱码一区二区三区| 乱中年女人伦av一区二区| 蜜桃视频在线一区| 国产一区二区美女诱惑| 国产成人鲁色资源国产91色综| 国产91在线观看丝袜| www.色综合.com| 91福利精品第一导航| 欧美人与z0zoxxxx视频| 欧美一区二区三区四区五区| 日韩一二在线观看| 久久久青草青青国产亚洲免观| 久久久国产精品麻豆| 成人免费视频在线观看| 亚洲成a人v欧美综合天堂| 青青草97国产精品免费观看| 国产精品资源网站| 91丝袜高跟美女视频| 欧美日本一道本| 久久久久88色偷偷免费| 亚洲视频在线一区观看| 亚洲高清免费观看| 国产中文一区二区三区| 成人免费高清视频在线观看| 欧美中文字幕一二三区视频| 欧美一级片在线看| 欧美激情一区二区三区不卡| 亚洲一区欧美一区| 国产在线精品国自产拍免费| 91网页版在线| 欧美一卡二卡在线观看| 国产精品毛片高清在线完整版| 亚洲国产综合人成综合网站| 国产呦萝稀缺另类资源| 欧美午夜电影一区| 亚洲成人av资源| 国产精品一卡二卡| 欧美视频一区在线| 国产精品欧美久久久久无广告| 亚洲午夜久久久| 成人白浆超碰人人人人| 8x8x8国产精品| 国产精品久久三| 精品一区二区三区蜜桃| 色综合久久66| 国产日韩综合av| 日日摸夜夜添夜夜添精品视频| www.在线欧美| 26uuu色噜噜精品一区| 亚洲综合精品自拍| 丁香婷婷综合色啪| 日韩免费福利电影在线观看| 亚洲综合色自拍一区| 福利电影一区二区| 日韩欧美不卡在线观看视频| 亚洲最大的成人av| 不卡的av在线播放| 久久精品亚洲一区二区三区浴池| 日韩电影在线一区二区| 色综合天天视频在线观看 | 国产喷白浆一区二区三区| 亚洲亚洲精品在线观看| 91污在线观看| 国产精品美女久久久久久久久| 激情六月婷婷综合| 7777精品伊人久久久大香线蕉超级流畅 | 亚洲国产欧美日韩另类综合| 成人三级在线视频| 久久久久久久久免费| 久久99精品久久久| 9191久久久久久久久久久| 一区二区三区四区在线播放| 成人深夜在线观看| 日本一区二区不卡视频| 国产成人免费视频精品含羞草妖精| 欧美一区二区三区视频| 亚洲国产综合91精品麻豆 | 日韩欧美国产麻豆| 免费观看在线色综合| 4438x亚洲最大成人网| 亚洲午夜在线视频| 欧美日韩免费一区二区三区| 亚洲精品国产第一综合99久久| 97久久精品人人做人人爽50路| 国产欧美日韩另类一区| 成人蜜臀av电影| 国产精品欧美久久久久无广告| 成人综合日日夜夜| 国产精品美女视频| 91丨porny丨在线| 亚洲精品久久7777| 欧美日韩国产首页| 日本一区中文字幕| 日韩女同互慰一区二区| 激情综合色播激情啊| 精品国产网站在线观看| 久久99精品久久只有精品| 久久久久久麻豆| 成人黄色777网| 亚洲蜜臀av乱码久久精品| 欧洲av一区二区嗯嗯嗯啊| 亚洲午夜久久久久久久久久久| 欧美群妇大交群的观看方式| 午夜精品国产更新| 日韩精品一区二区三区四区| 国产综合久久久久久鬼色| 中文在线资源观看网站视频免费不卡| 国产成人av一区| 亚洲欧洲制服丝袜| 欧美日韩免费电影| 捆绑调教美女网站视频一区| 欧美精品一区二区三区蜜桃| 国产69精品久久777的优势| 国产精品久久夜| 欧美日韩精品一区二区三区蜜桃 | 欧美大片在线观看一区二区| 国产一区二区三区最好精华液| 欧美国产综合色视频| 色婷婷av一区二区三区之一色屋| 亚洲成av人片一区二区梦乃| 精品处破学生在线二十三| 国产福利一区二区三区视频| 亚洲精品欧美综合四区| 欧美肥大bbwbbw高潮| 国产乱理伦片在线观看夜一区| 国产精品久久午夜| 欧美一区二区美女| 成人av在线影院| 三级在线观看一区二区| 国产午夜精品美女毛片视频| 91在线porny国产在线看| 日本成人中文字幕在线视频| 久久久久久久久久久黄色| 日本丶国产丶欧美色综合| 精品一区二区免费在线观看| 日韩一区在线看| 欧美大白屁股肥臀xxxxxx| 91色.com| 久久97超碰色| 亚洲综合一区在线| 久久久噜噜噜久久人人看 | 日韩免费观看高清完整版| 91一区二区三区在线观看| 麻豆精品视频在线观看视频| 亚洲黄一区二区三区| 久久嫩草精品久久久久| 欧美系列一区二区| 成人18视频在线播放| 美国三级日本三级久久99| 成人免费一区二区三区在线观看| 精品福利一区二区三区 | 国产精品国产三级国产有无不卡| 欧美日韩一区二区三区在线看| 粉嫩av一区二区三区| 裸体一区二区三区|