awsEmbeddedComponent Class Reference
Class used to create new AWS components. More...
#include <awsecomp.h>
Inheritance diagram for awsEmbeddedComponent:

Public Methods | |
virtual iAwsComponent * | GetComponent () |
Gets the component owner for this (sources are embedded). | |
virtual bool | RegisterSlot (iAwsSlot *slot, unsigned long signal) |
Registers a slot for a signal. | |
virtual bool | UnregisterSlot (iAwsSlot *slot, unsigned long signal) |
Unregisters a slot for a signal. | |
virtual void | Broadcast (unsigned long signal) |
Broadcasts a signal to all slots that are interested. | |
virtual void | Initialize (iAwsComponent *component) |
Sets the embedded component. MUST BE CALLED BEFORE ANY OTHER FUNCTION! | |
virtual bool | Create (iAws *m, iAwsComponent *parent, iAwsComponentNode *settings) |
This function takes care of the creation tasks required to prepare this component for use. | |
virtual bool | Setup (iAws *wmgr, iAwsComponentNode *settings) |
Sets up component. | |
virtual bool | HandleEvent (iEvent &Event) |
Event dispatcher, demultiplexes events and sends them off to the proper event handler. | |
virtual bool | GetProperty (const char *name, void **parm) |
Gets the property specified, setting the parameter to a COPY of the property's value. | |
virtual bool | SetProperty (const char *name, void *parm) |
Sets the property specified, setting the proprty to whatever is in parm. | |
virtual bool | Execute (const char *action, iAwsParmList *parmlist) |
Executes scriptable actions for this window. | |
virtual void | SetFlag (unsigned int flag) |
Sets the flag (can handle multiple simultaneous sets). | |
virtual void | ClearFlag (unsigned int flag) |
Clears the flag (can handle multiple simultaneous clears). | |
virtual unsigned int | Flags () |
Returns the current state of the flags. | |
virtual void | Invalidate () |
Invalidation routine: allow the component to be redrawn when you call this. | |
virtual void | Invalidate (csRect area) |
Invalidation routine: allow component to be redrawn, but only part of it. | |
virtual csRect | Frame () |
Get this component's frame. | |
virtual csRect | ClientFrame () |
Get this component's client frame. | |
virtual const char * | Type () |
Returns the named TYPE of the component, like "Radio Button", etc. | |
virtual bool | Overlaps (csRect &r) |
Returns true if this window overlaps the given rect. | |
virtual bool | isHidden () |
Returns the state of the hidden flag. | |
virtual void | Hide () |
Hides a component. | |
virtual void | Show () |
Shows a component. | |
virtual void | Move (int delta_x, int delta_y) |
Moves a component. | |
virtual void | MoveTo (int x, int y) |
Moves a component to an absolute location. | |
virtual void | Resize (int width, int height) |
Resizes a component. | |
virtual void | ResizeTo (csRect newFrame) |
Resizes a component to an absolute rect. | |
virtual unsigned long | GetID () |
Get's the unique id of this component. | |
virtual void | SetID (unsigned long id) |
Set's the unique id of this component. | |
virtual iAwsComponent * | FindChild (const char *name) |
Gets a child component by name, returns 0 on failure. | |
virtual iAwsComponent * | DoFindChild (unsigned int id) |
Gets a child component by id, returns 0 on failure. | |
virtual bool | IsMaximized () |
Returns true if the component is maximized. | |
virtual void | Maximize () |
Maximizes this component. | |
virtual void | UnMaximize () |
Returns the component to its unmaximized size. | |
virtual void | LayoutChildren () |
Resizes all the children of this component using the current layout. | |
virtual void | AddToLayout (iAwsComponent *cmp, iAwsComponentNode *settings) |
Adds a component to this component's layout. | |
virtual void | SetFocusable (bool focusable) |
Set component can focus. | |
virtual bool | Focusable () |
Returns component can focus. | |
virtual bool | isFocused () |
Return component is focused. | |
virtual void | SetFocus () |
Sets component focused. | |
virtual void | UnsetFocus () |
Unsets component focused. | |
virtual bool | AddToTabOrder (iAwsComponent *cmp) |
Add child to parent tab order. | |
virtual iAwsComponent * | TabNext (iAwsComponent *cmp) |
Returns next component in tab order. | |
virtual iAwsComponent * | TabPrev (iAwsComponent *cmp) |
Returns previous component in tab order. | |
virtual int | GetTabLength () |
Returns tab order length. | |
virtual iAwsComponent * | GetTabComponent (int index) |
Return component by tabindex. | |
virtual iAwsComponent * | GetFirstFocusableChild (iAwsComponent *comp) |
Returns first focusable component on this component. | |
virtual void | AddChild (iAwsComponent *child) |
Adds a child. | |
virtual void | RemoveChild (iAwsComponent *child) |
Removes a child. | |
virtual int | GetChildCount () |
Get's the number of children. | |
virtual iAwsComponent * | GetTopChild () |
Get's a specific child. | |
virtual bool | HasChildren () |
Returns true if this component has children. | |
virtual iAwsComponent * | ChildAt (int x, int y) |
Returns the highest child (if any) whose frame contains (x,y). | |
iAws * | WindowManager () |
Get's this components idea of the window manager. | |
iAwsComponent * | Window () |
Get's the window that this component resides in. | |
iAwsComponent * | Parent () |
Get's the parent component of this component;. | |
virtual void | SetParent (iAwsComponent *parent) |
Sets the parent component of this component;. | |
virtual iAwsComponent * | ComponentAbove () |
Get's the component above this one, 0 if there is none. | |
virtual iAwsComponent * | ComponentBelow () |
Get's the component below this one, 0 if there is none. | |
virtual void | SetComponentAbove (iAwsComponent *cmp) |
Set's the component above this one. | |
virtual void | SetComponentBelow (iAwsComponent *cmp) |
Set's the component below this one. | |
virtual void | Raise () |
Moves this component above all its siblings. | |
virtual void | Lower () |
Moves this component below all its siblings. | |
virtual void | SetRedrawTag (unsigned int tag) |
Sets the value of the redraw tag. | |
virtual unsigned int | RedrawTag () |
Gets the value of the redraw tag. | |
virtual void | OnDraw (csRect clip) |
Triggered when the component needs to draw. | |
virtual bool | OnMouseDown (int button, int x, int y) |
Triggered when the user presses a mouse button down. | |
virtual bool | OnMouseUp (int button, int x, int y) |
Triggered when the user unpresses a mouse button. | |
virtual bool | OnMouseMove (int button, int x, int y) |
Triggered when the user moves the mouse. | |
virtual bool | OnMouseClick (int button, int x, int y) |
Triggered when the user clicks the mouse. | |
virtual bool | OnMouseDoubleClick (int button, int x, int y) |
Triggered when the user double clicks the mouse. | |
virtual bool | OnMouseExit () |
Triggered when this component loses mouse focus. | |
virtual bool | OnMouseEnter () |
Triggered when this component gains mouse focus. | |
virtual bool | OnKeyboard (const csKeyEventData &eventData) |
Triggered when the user presses a key. | |
virtual bool | OnLostFocus () |
Triggered when the keyboard focus is lost. | |
virtual bool | OnGainFocus () |
Triggered when the keyboard focus is gained. | |
virtual iAwsLayoutManager * | Layout () |
Gets the layout manager for this component. | |
virtual void | SetLayout (iAwsLayoutManager *layoutMgr) |
Set the layout manager. | |
virtual csRect | getPreferredSize () |
get the components preferred size, used by layout manager | |
virtual void | setPreferredSize (const csRect &size) |
Set the preferred size of the component. | |
virtual void | clearPreferredSize () |
Clear the manually set preferred size. | |
virtual csRect | getMinimumSize () |
get the components minimal size, used by layout manager | |
virtual csRect | getInsets () |
get the components insets, used by layout manager | |
virtual bool | isDeaf () |
does the component listen to events ? | |
virtual void | SetDeaf (bool isDeaf) |
let the component listen to events or not | |
virtual bool | OnFrame () |
Triggered at the start of each frame. | |
virtual void | OnAdded () |
Triggered when a child is added to the parent (triggered on the child). | |
virtual void | OnResized () |
Triggered when a component is resized by the layout manager. | |
virtual void | OnChildMoved () |
Triggered when a child component has been moved. | |
virtual void | OnRaise () |
Triggered when the Raise function is called. | |
virtual void | OnLower () |
Triggered when the Lower function is called. | |
virtual void | OnChildHide () |
Triggered when a child becomes hidden. | |
virtual void | OnChildShow () |
Triggered when a child becomes shown. | |
virtual void | Unlink () |
Removes a component from the hierarchy. | |
virtual void | LinkAbove (iAwsComponent *other) |
Links a component into the hierarchy as a sibling above comp. | |
virtual void | LinkBelow (iAwsComponent *other) |
Links a component into the hierarchy as a sibling below comp. | |
virtual void | SetTopChild (iAwsComponent *child) |
Sets the top child. | |
virtual void | OnSetFocus () |
Triggered when a child becomes focused. | |
virtual void | OnUnsetFocus () |
Triggered when a child looses focus. |
Detailed Description
Class used to create new AWS components.
To create component from scratch, you need to subclass from awsEmbeddedComponent. After instantiating from that object, you need to call Initialize() with a component gotten from iAWS::CreateEmbeddableComponent(). After writing the code for that component, you need to subclass from awsEmbeddedComponentFactory. Do your constant registrations, etc. At runtime you simply need to instantiate the derived factory, which handles registration and creation for you. The instantiation of the component needs to happen in the Factory in a function called Create().
Definition at line 42 of file awsecomp.h.
Member Function Documentation
|
Adds a child.
Implements iAwsComponent. Definition at line 333 of file awsecomp.h. |
|
Adds a component to this component's layout.
Implements iAwsComponent. Definition at line 285 of file awsecomp.h. |
|
Add child to parent tab order.
Implements iAwsComponent. Definition at line 309 of file awsecomp.h. |
|
Broadcasts a signal to all slots that are interested.
Implements iAwsSource. Definition at line 64 of file awsecomp.h. |
|
Returns the highest child (if any) whose frame contains (x,y).
Implements iAwsComponent. Definition at line 352 of file awsecomp.h. |
|
Clears the flag (can handle multiple simultaneous clears).
Implements iAwsComponent. Definition at line 193 of file awsecomp.h. |
|
Clear the manually set preferred size.
Implements iAwsComponent. Definition at line 468 of file awsecomp.h. |
|
Get this component's client frame.
Implements iAwsComponent. Definition at line 213 of file awsecomp.h. |
|
Get's the component above this one, 0 if there is none.
Implements iAwsComponent. Definition at line 376 of file awsecomp.h. |
|
Get's the component below this one, 0 if there is none.
Implements iAwsComponent. Definition at line 380 of file awsecomp.h. |
|
This function takes care of the creation tasks required to prepare this component for use. If you create a component via the window manager's creation functions then you should not call this, the window manager has done it for you. If you create components programatically then you are encouraged to call this func to make setup easier. For component developers, you should not need to override Create but rather do your setup work in Setup. If it returns false then the component was not able to initialize properly and shouldn't be used. Reproducing the create code here is a temporary fix until I can find a better solution. Currently you can not properly embed the menu and popupMenu components like this. Implements iAwsComponent. Definition at line 91 of file awsecomp.h. References iAwsComponent::AddChild(), iAwsLayoutManager::AddComponent(), AWSF_CMP_NON_CLIENT, Flags(), iAws::GetTopComponent(), iAwsComponent::Layout(), LinkAbove(), iAwsKey::Name(), Parent(), SetID(), SetParent(), iAws::SetTopComponent(), and Setup(). |
|
Gets a child component by id, returns 0 on failure.
Implements iAwsComponent. Definition at line 269 of file awsecomp.h. |
|
Executes scriptable actions for this window.
Implements iAwsComponent. Definition at line 185 of file awsecomp.h. |
|
Gets a child component by name, returns 0 on failure.
Implements iAwsComponent. Definition at line 266 of file awsecomp.h. |
|
Returns the current state of the flags.
Implements iAwsComponent. Definition at line 197 of file awsecomp.h. Referenced by Create(). |
|
Returns component can focus.
Implements iAwsComponent. Definition at line 293 of file awsecomp.h. |
|
Get this component's frame.
Implements iAwsComponent. Definition at line 209 of file awsecomp.h. |
|
Get's the number of children.
Implements iAwsComponent. Definition at line 341 of file awsecomp.h. |
|
Gets the component owner for this (sources are embedded).
Implements iAwsSource. Definition at line 52 of file awsecomp.h. |
|
Returns first focusable component on this component.
Implements iAwsComponent. Definition at line 329 of file awsecomp.h. References iAwsComponent::GetFirstFocusableChild(). |
|
Get's the unique id of this component.
Implements iAwsComponent. Definition at line 256 of file awsecomp.h. |
|
get the components insets, used by layout manager
Implements iAwsComponent. Definition at line 476 of file awsecomp.h. |
|
get the components minimal size, used by layout manager
Implements iAwsComponent. Definition at line 472 of file awsecomp.h. |
|
get the components preferred size, used by layout manager
Implements iAwsComponent. Definition at line 460 of file awsecomp.h. |
|
Gets the property specified, setting the parameter to a COPY of the property's value. Returns false if there's no such property. Implements iAwsComponent. Definition at line 174 of file awsecomp.h. |
|
Return component by tabindex.
Implements iAwsComponent. Definition at line 325 of file awsecomp.h. |
|
Returns tab order length.
Implements iAwsComponent. Definition at line 321 of file awsecomp.h. |
|
Get's a specific child.
Implements iAwsComponent. Definition at line 345 of file awsecomp.h. |
|
Event dispatcher, demultiplexes events and sends them off to the proper event handler.
Implements iAwsComponent. Definition at line 133 of file awsecomp.h. References csEventMouseData::Button, csevFrameStart, csevGainFocus, csevKeyboard, csevLostFocus, csevMouseClick, csevMouseDown, csevMouseEnter, csevMouseExit, csevMouseMove, csevMouseUp, csKeyEventTypeDown, csKeyEventHelper::GetEventData(), csKeyEventHelper::GetEventType(), iEvent::Mouse, OnFrame(), OnGainFocus(), OnKeyboard(), OnLostFocus(), OnMouseClick(), OnMouseDown(), OnMouseEnter(), OnMouseExit(), OnMouseMove(), OnMouseUp(), iEvent::Type, csEventMouseData::x, and csEventMouseData::y. |
|
Returns true if this component has children.
Implements iAwsComponent. Definition at line 349 of file awsecomp.h. |
|
Hides a component.
Implements iAwsComponent. Definition at line 232 of file awsecomp.h. |
|
Sets the embedded component. MUST BE CALLED BEFORE ANY OTHER FUNCTION!
Definition at line 69 of file awsecomp.h. |
|
Invalidation routine: allow component to be redrawn, but only part of it.
Implements iAwsComponent. Definition at line 205 of file awsecomp.h. |
|
Invalidation routine: allow the component to be redrawn when you call this.
Implements iAwsComponent. Definition at line 201 of file awsecomp.h. |
|
does the component listen to events ?
Implements iAwsComponent. Definition at line 480 of file awsecomp.h. Referenced by SetDeaf(). |
|
Return component is focused.
Implements iAwsComponent. Definition at line 297 of file awsecomp.h. |
|
Returns the state of the hidden flag.
Implements iAwsComponent. Definition at line 228 of file awsecomp.h. |
|
Returns true if the component is maximized.
Implements iAwsComponent. Definition at line 272 of file awsecomp.h. |
|
Gets the layout manager for this component.
Implements iAwsComponent. Definition at line 452 of file awsecomp.h. |
|
Resizes all the children of this component using the current layout.
Implements iAwsComponent. Definition at line 282 of file awsecomp.h. |
|
Links a component into the hierarchy as a sibling above comp.
Implements iAwsComponent. Definition at line 524 of file awsecomp.h. Referenced by Create(). |
|
Links a component into the hierarchy as a sibling below comp.
Implements iAwsComponent. Definition at line 528 of file awsecomp.h. |
|
Moves this component below all its siblings.
Implements iAwsComponent. Definition at line 396 of file awsecomp.h. |
|
Maximizes this component.
Implements iAwsComponent. Definition at line 275 of file awsecomp.h. |
|
Moves a component.
Implements iAwsComponent. Definition at line 240 of file awsecomp.h. |
|
Moves a component to an absolute location.
Implements iAwsComponent. Definition at line 244 of file awsecomp.h. |
|
Triggered when a child is added to the parent (triggered on the child).
Implements iAwsComponent. Definition at line 492 of file awsecomp.h. |
|
Triggered when a child becomes hidden.
Implements iAwsComponent. Definition at line 512 of file awsecomp.h. |
|
Triggered when a child component has been moved.
Implements iAwsComponent. Definition at line 500 of file awsecomp.h. |
|
Triggered when a child becomes shown.
Implements iAwsComponent. Definition at line 516 of file awsecomp.h. |
|
Triggered when the component needs to draw.
Implements iAwsComponent. Definition at line 408 of file awsecomp.h. |
|
Triggered at the start of each frame.
Implements iAwsComponent. Definition at line 488 of file awsecomp.h. Referenced by HandleEvent(). |
|
Triggered when the keyboard focus is gained.
Implements iAwsComponent. Definition at line 448 of file awsecomp.h. Referenced by HandleEvent(). |
|
Triggered when the user presses a key.
Implements iAwsComponent. Definition at line 440 of file awsecomp.h. Referenced by HandleEvent(). |
|
Triggered when the keyboard focus is lost.
Implements iAwsComponent. Definition at line 444 of file awsecomp.h. Referenced by HandleEvent(). |
|
Triggered when the Lower function is called.
Implements iAwsComponent. Definition at line 508 of file awsecomp.h. |
|
Triggered when the user clicks the mouse.
Implements iAwsComponent. Definition at line 424 of file awsecomp.h. Referenced by HandleEvent(). |
|
Triggered when the user double clicks the mouse.
Implements iAwsComponent. Definition at line 428 of file awsecomp.h. |
|
Triggered when the user presses a mouse button down.
Implements iAwsComponent. Definition at line 412 of file awsecomp.h. Referenced by HandleEvent(). |
|
Triggered when this component gains mouse focus.
Implements iAwsComponent. Definition at line 436 of file awsecomp.h. Referenced by HandleEvent(). |
|
Triggered when this component loses mouse focus.
Implements iAwsComponent. Definition at line 432 of file awsecomp.h. Referenced by HandleEvent(). |
|
Triggered when the user moves the mouse.
Implements iAwsComponent. Definition at line 420 of file awsecomp.h. Referenced by HandleEvent(). |
|
Triggered when the user unpresses a mouse button.
Implements iAwsComponent. Definition at line 416 of file awsecomp.h. Referenced by HandleEvent(). |
|
Triggered when the Raise function is called.
Implements iAwsComponent. Definition at line 504 of file awsecomp.h. |
|
Triggered when a component is resized by the layout manager.
Implements iAwsComponent. Definition at line 496 of file awsecomp.h. |
|
Triggered when a child becomes focused.
Implements iAwsComponent. Definition at line 536 of file awsecomp.h. |
|
Triggered when a child looses focus.
Implements iAwsComponent. Definition at line 540 of file awsecomp.h. |
|
Returns true if this window overlaps the given rect.
Implements iAwsComponent. Definition at line 224 of file awsecomp.h. |
|
Get's the parent component of this component;.
Implements iAwsComponent. Definition at line 368 of file awsecomp.h. Referenced by Create(). |
|
Moves this component above all its siblings.
Implements iAwsComponent. Definition at line 392 of file awsecomp.h. |
|
Gets the value of the redraw tag.
Implements iAwsComponent. Definition at line 404 of file awsecomp.h. |
|
Registers a slot for a signal.
Implements iAwsSource. Definition at line 56 of file awsecomp.h. |
|
Removes a child.
Implements iAwsComponent. Definition at line 337 of file awsecomp.h. |
|
Resizes a component.
Implements iAwsComponent. Definition at line 248 of file awsecomp.h. |
|
Resizes a component to an absolute rect.
Implements iAwsComponent. Definition at line 252 of file awsecomp.h. |
|
Set's the component above this one.
Implements iAwsComponent. Definition at line 384 of file awsecomp.h. |
|
Set's the component below this one.
Implements iAwsComponent. Definition at line 388 of file awsecomp.h. |
|
let the component listen to events or not
Implements iAwsComponent. Definition at line 484 of file awsecomp.h. References isDeaf(). |
|
Sets the flag (can handle multiple simultaneous sets).
Implements iAwsComponent. Definition at line 189 of file awsecomp.h. |
|
Sets component focused.
Implements iAwsComponent. Definition at line 301 of file awsecomp.h. |
|
Set component can focus.
Implements iAwsComponent. Definition at line 289 of file awsecomp.h. |
|
Set's the unique id of this component. Note: only to be used by window manager. Implements iAwsComponent. Definition at line 263 of file awsecomp.h. Referenced by Create(). |
|
Set the layout manager.
Implements iAwsComponent. Definition at line 456 of file awsecomp.h. |
|
Sets the parent component of this component;.
Implements iAwsComponent. Definition at line 372 of file awsecomp.h. Referenced by Create(). |
|
Set the preferred size of the component.
Implements iAwsComponent. Definition at line 464 of file awsecomp.h. |
|
Sets the property specified, setting the proprty to whatever is in parm. Returns false if there's no such property. Implements iAwsComponent. Definition at line 181 of file awsecomp.h. |
|
Sets the value of the redraw tag.
Implements iAwsComponent. Definition at line 400 of file awsecomp.h. |
|
Sets the top child.
Implements iAwsComponent. Definition at line 532 of file awsecomp.h. |
|
Sets up component.
Implements iAwsComponent. Definition at line 126 of file awsecomp.h. Referenced by Create(). |
|
Shows a component.
Implements iAwsComponent. Definition at line 236 of file awsecomp.h. |
|
Returns next component in tab order.
Implements iAwsComponent. Definition at line 313 of file awsecomp.h. |
|
Returns previous component in tab order.
Implements iAwsComponent. Definition at line 317 of file awsecomp.h. |
|
Returns the named TYPE of the component, like "Radio Button", etc. This should always be overridden. Implements iAwsComponent. Definition at line 220 of file awsecomp.h. |
|
Removes a component from the hierarchy.
Implements iAwsComponent. Definition at line 520 of file awsecomp.h. |
|
Returns the component to its unmaximized size.
Implements iAwsComponent. Definition at line 278 of file awsecomp.h. |
|
Unregisters a slot for a signal.
Implements iAwsSource. Definition at line 60 of file awsecomp.h. |
|
Unsets component focused.
Implements iAwsComponent. Definition at line 305 of file awsecomp.h. |
|
Get's the window that this component resides in.
Implements iAwsComponent. Definition at line 364 of file awsecomp.h. |
|
Get's this components idea of the window manager. Should be used internally by the component ONLY, or by embedding classes. Implements iAwsComponent. Definition at line 360 of file awsecomp.h. |
The documentation for this class was generated from the following file:
- iaws/awsecomp.h
Generated for Crystal Space by doxygen 1.2.18