Home | All Classes | Grouped Classes | Index | Search
Component base class. More...
Derived from:
none
Derived by:
CL_Button
CL_ComponentMoveHandler
CL_ComponentResizeHandler
CL_Frame
CL_GUIManager
CL_Image
CL_InputBox
CL_Label
CL_ListBox
CL_Menu
CL_MenuItem
CL_MenuNode
CL_ProgressBar
CL_RichEdit
CL_ScrollBar
CL_TreeItem
CL_TreeView
CL_Window
Group: GUI (Framework)
#include <ClanLib/gui.h>
Construction:
Component Constructor |
Attributes:
Returns the client area of the component. | |
Returns the parent component, or NULL if none. | |
Returns the root parent. | |
Returns the GUI manager that this component is attached to, or NULL if none. | |
Returns the style manager used by this component. | |
Returns the width of the component. | |
Returns the height of the component. | |
Returns the components x position in screen coordinates. | |
Returns the components y position in screen coordinates. | |
Returns the components x position in client coordinates. | |
Returns the components y position in client coordinates. | |
Returns the components position in screen coordinates. | |
Returns the rect with coordinates converted from client to screen | |
Returns the rect with coordinates converted from screen to client | |
Returns the position of this component. | |
Returns the position of this component after extending the rect to fit all children as well | |
Get the minimum size of the component. | |
Get the maximum size of the component. | |
Get the preferred size of the component. | |
Returns the vertical size policy of the component. | |
Returns the horizontal size policy of the component. | |
returns the layout for this component. | |
Returns true if event passing is enabled. | |
Returns true if the passed component is a child of this component. | |
Returns the list of child components. | |
Returns the bounding rectangle of the component's children. | |
Returns the component at (pos_x, pos_y). | |
Returns the component that currently has the focus. | |
Returns true if component has the focus. | |
Returns true if the component can be focused. | |
Returns true if the mouse is currently highlighting the component. | |
Returns true if component is visible. | |
Returns true if component accepts user input. | |
Returns true if component has mouse captured. | |
Returns the tab id of the component. | |
Returns the component style. | |
Returns true if component is in modal state. | |
Returns true if component have parents which on top of gui_manager modal stack. | |
Returns true if the topmost flag is set. |
Operations:
Set the tab id of the component. | |
Sets the position (relative to its parent) and size of this component. | |
Sets the size of this component. | |
Changes the width of the component. | |
Changes the height of the component. | |
Set the minimum size of the component. | |
Set the maximum size of the component. | |
Set the preferred size of the component. | |
Set the vertical size policy of the component. | |
Set the horizontal size policy of the component. | |
Set the layout for this component. | |
Enables/disables the event passing to parent. | |
Sets the parent of this component. | |
Sets the GUI manager this component is attached to. | |
Changes the visibility flag. | |
Enable/disable user input. | |
Enable/disable the ability to focus component. | |
Give focus to this component. | |
Raises this component to the top of the parent component's stack. | |
Lowers this component to the bottom of the parent component's stack. | |
Capture the mouse on the currently attached GUI manager. All mouse input will be directed to this component until release_mouse() is called. | |
Releases the mouse capture. | |
Asks the GUI to repaint itself. | |
Calls sig_begin_paint(), then sig_paint(), and finally sig_end_paint(). | |
Run the component as a modal component until quit() is called. | |
Quit the modal loop of the component. | |
"Closes" this component. Hides and detaches component from parent. | |
Adds the specified component as a children to this component. | |
Removes the specified child from the component. | |
Sets a component style to the component. | |
Calculate a default size. | |
Returns the component with the specified tab ID. | |
Set the client area of the component. Not used by user - only by other components. | |
Sets or clears the topmost flag. | |
Enables automatic clipping when drawing component. |
Signals:
Update component with a new set of component options. | |
Draws the component. Must be called in a begin_paint() / end_paint() session. | |
Called prior to component drawing. Sets up a cliprect and translocates coordinates accordingly to this component. | |
Called after component drawing, and draws all the children. | |
Cleans up when component drawing is finished (cleans up cliprects and translocation stuff). | |
Called when any inputdevice button is pressed (keyboard, mouse, joystick, etc). | |
Called when any inputdevice button is released (keyboard, mouse, joystick, etc) | |
Called when a key is pressed on keyboard. | |
Called when a key is released on keyboard. | |
Called when a mousebutton is clicked. The CL_InputEvent contains the coordinates and which button was pressed | |
Called when a mousebutton is released. | |
Called when a mousebutton is doubleclicked. | |
Called when the mouse is moved. | |
Called when mouse enters the component area. | |
Called when mouse leaves the component area. | |
Called when component gains focus. | |
Called when component lose focus. | |
Called when component is closed. | |
Called when component is resized. The two parameters are the OLD width and height of the component. | |
Called when component is moved. The two parameters are the OLD positions of the component. | |
Called when a child component is about to be added to the component. | |
Called when a child component is added to the component. | |
Called when a child component is about to be removed from the component. | |
Called when a child component is removed from the component. | |
Called when needing to convert parent coordinates into coordinates used by this component. | |
Called when needing to find the minimum size of the component. Normally used by the styles. | |
Called when needing to find the maximum size of the component. Normally used by the styles. | |
Called when needing to find the preferred size of the component. Normally used by the styles. |
Implementation:
Detailed description:
!group=GUI/Framework! !header=gui.h!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.