![]() |
Public API Reference |
#include <awsecomp.h>
Inheritance diagram for awsEmbeddedComponent:
Public Methods | |
virtual iAwsComponent * | GetComponent () |
Gets the component owner for this (sources are embedded). More... | |
virtual bool | RegisterSlot (iAwsSlot *slot, unsigned long signal) |
Registers a slot for a signal. More... | |
virtual bool | UnregisterSlot (iAwsSlot *slot, unsigned long signal) |
Unregisters a slot for a signal. More... | |
virtual void | Broadcast (unsigned long signal) |
Broadcasts a signal to all slots that are interested. More... | |
virtual void | Initialize (iAwsComponent *component) |
Sets the embedded component. MUST BE CALLED BEFORE ANY OTHER FUNCTION! More... | |
virtual bool | Create (iAws *m, iAwsComponent *parent, iAwsComponentNode *settings) |
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. More... | |
virtual bool | Setup (iAws *wmgr, iAwsComponentNode *settings) |
Sets up component. More... | |
virtual bool | HandleEvent (iEvent &Event) |
Event dispatcher, demultiplexes events and sends them off to the proper event handler. More... | |
virtual bool | GetProperty (const char *name, void **parm) |
Gets the property specified, setting the parameter to a COPY of the property's value. Returns false if there's no such property. More... | |
virtual bool | SetProperty (const char *name, void *parm) |
Sets the property specified, setting the proprty to whatever is in parm. Returns false if there's no such property. More... | |
virtual bool | Execute (const char *action, iAwsParmList *parmlist) |
Executes scriptable actions for this window. More... | |
virtual void | SetFlag (unsigned int flag) |
Sets the flag (can handle multiple simultaneous sets). More... | |
virtual void | ClearFlag (unsigned int flag) |
Clears the flag (can handle multiple simultaneous clears). More... | |
virtual unsigned int | Flags () |
Returns the current state of the flags. More... | |
virtual void | Invalidate () |
Invalidation routine: allow the component to be redrawn when you call this. More... | |
virtual void | Invalidate (csRect area) |
Invalidation routine: allow component to be redrawn, but only part of it. More... | |
virtual csRect | Frame () |
Get this component's frame. More... | |
virtual csRect | ClientFrame () |
Get this component's client frame. More... | |
virtual const char * | Type () |
Returns the named TYPE of the component, like "Radio Button", etc. This should always be overridden. More... | |
virtual bool | Overlaps (csRect &r) |
Returns true if this window overlaps the given rect. More... | |
virtual bool | isHidden () |
Returns the state of the hidden flag. More... | |
virtual void | Hide () |
Hides a component. More... | |
virtual void | Show () |
Shows a component. More... | |
virtual void | Move (int delta_x, int delta_y) |
Moves a component. More... | |
virtual void | MoveTo (int x, int y) |
Moves a component to an absolute location. More... | |
virtual void | Resize (int width, int height) |
Resizes a component. More... | |
virtual void | ResizeTo (csRect newFrame) |
Resizes a component to an absolute rect. More... | |
virtual unsigned long | GetID () |
Get's the unique id of this component. More... | |
virtual void | SetID (unsigned long _id) |
Set's the unique id of this component. Note: only to be used by window manager. More... | |
virtual iAwsComponent * | FindChild (const char *name) |
Gets a child component by name, returns NULL on failure. More... | |
virtual iAwsComponent * | DoFindChild (unsigned int id) |
Gets a child component by id, returns NULL on failure. More... | |
virtual bool | IsMaximized () |
Returns true if the component is maximized. More... | |
virtual void | Maximize () |
Maximizes this component. More... | |
virtual void | UnMaximize () |
Returns the component to its unmaximized size. More... | |
virtual void | LayoutChildren () |
Resizes all the children of this component using the current layout. More... | |
virtual void | AddToLayout (iAwsComponent *cmp, iAwsComponentNode *settings) |
Adds a component to this component's layout. More... | |
virtual void | AddChild (iAwsComponent *child) |
Adds a child. More... | |
virtual void | RemoveChild (iAwsComponent *child) |
Removes a child. More... | |
virtual int | GetChildCount () |
Get's the number of children. More... | |
virtual iAwsComponent * | GetTopChild () |
Get's a specific child. More... | |
virtual bool | HasChildren () |
Returns true if this component has children. More... | |
virtual iAwsComponent * | ChildAt (int x, int y) |
Returns the highest child (if any) whose frame contains (x,y). More... | |
iAws * | WindowManager () |
Get's this components idea of the window manager. More... | |
iAwsComponent * | Window () |
Get's the window that this component resides in. More... | |
iAwsComponent * | Parent () |
Get's the parent component of this component;. More... | |
virtual void | SetParent (iAwsComponent *parent) |
Sets the parent component of this component;. More... | |
virtual iAwsComponent * | ComponentAbove () |
Get's the component above this one, NULL if there is none. More... | |
virtual iAwsComponent * | ComponentBelow () |
Get's the component below this one, NULL if there is none. More... | |
virtual void | SetComponentAbove (iAwsComponent *cmp) |
Set's the component above this one. More... | |
virtual void | SetComponentBelow (iAwsComponent *cmp) |
Set's the component below this one. More... | |
virtual void | Raise () |
Moves this component above all its siblings. More... | |
virtual void | Lower () |
Moves this component below all its siblings. More... | |
virtual void | SetRedrawTag (unsigned int tag) |
Sets the value of the redraw tag. More... | |
virtual unsigned int | RedrawTag () |
Gets the value of the redraw tag. More... | |
virtual void | OnDraw (csRect clip) |
Triggered when the component needs to draw. More... | |
virtual bool | OnMouseDown (int button, int x, int y) |
Triggered when the user presses a mouse button down. More... | |
virtual bool | OnMouseUp (int button, int x, int y) |
Triggered when the user unpresses a mouse button. More... | |
virtual bool | OnMouseMove (int button, int x, int y) |
Triggered when the user moves the mouse. More... | |
virtual bool | OnMouseClick (int button, int x, int y) |
Triggered when the user clicks the mouse. More... | |
virtual bool | OnMouseDoubleClick (int button, int x, int y) |
Triggered when the user double clicks the mouse. More... | |
virtual bool | OnMouseExit () |
Triggered when this component loses mouse focus. More... | |
virtual bool | OnMouseEnter () |
Triggered when this component gains mouse focus. More... | |
virtual bool | OnKeypress (int key, int cha, int modifiers) |
Triggered when the user presses a key. More... | |
virtual bool | OnLostFocus () |
Triggered when the keyboard focus is lost. More... | |
virtual bool | OnGainFocus () |
Triggered when the keyboard focus is gained. More... | |
virtual iAwsLayoutManager * | Layout () |
Gets the layout manager for this component. More... | |
virtual void | SetLayout (iAwsLayoutManager *layoutMgr) |
Set the layout manager. More... | |
virtual csRect | getPreferredSize () |
get the components preferred size, used by layout manager. More... | |
virtual csRect | getMinimumSize () |
get the components minimal size, used by layout manager. More... | |
virtual csRect | getInsets () |
get the components insets, used by layout manager. More... | |
virtual bool | isDeaf () |
does the component listen to events ? More... | |
virtual void | SetDeaf (bool isDeaf) |
let the component listen to events or not. More... | |
virtual bool | OnFrame () |
Triggered at the start of each frame. More... | |
virtual void | OnAdded () |
Triggered when a child is added to the parent (triggered on the child). More... | |
virtual void | OnResized () |
Triggered when a component is resized by the layout manager. More... | |
virtual void | OnChildMoved () |
Triggered when a child component has been moved. More... | |
virtual void | OnRaise () |
Triggered when the Raise function is called. More... | |
virtual void | OnLower () |
Triggered when the Lower function is called. More... | |
virtual void | OnChildHide () |
Triggered when a child becomes hidden. More... | |
virtual void | OnChildShow () |
Triggered when a child becomes shown. More... | |
virtual void | Unlink () |
Removes a component from the hierarchy. More... | |
virtual void | LinkAbove (iAwsComponent *other) |
Links a component into the hierarchy as a sibling above comp. More... | |
virtual void | LinkBelow (iAwsComponent *other) |
Links a component into the hierarchy as a sibling below comp. More... | |
virtual void | SetTopChild (iAwsComponent *child) |
Sets the top child. More... |
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 38 of file awsecomp.h.
|
Adds a child.
Implements iAwsComponent. Definition at line 264 of file awsecomp.h. References iAwsComponent::AddChild. |
|
Adds a component to this component's layout.
Implements iAwsComponent. Definition at line 258 of file awsecomp.h. References iAwsComponent::AddToLayout. |
|
Broadcasts a signal to all slots that are interested.
Implements iAwsSource. Definition at line 62 of file awsecomp.h. References iAwsSource::Broadcast. |
|
Returns the highest child (if any) whose frame contains (x,y).
Implements iAwsComponent. Definition at line 283 of file awsecomp.h. References iAwsComponent::ChildAt. |
|
Clears the flag (can handle multiple simultaneous clears).
Implements iAwsComponent. Definition at line 172 of file awsecomp.h. References iAwsComponent::ClearFlag. |
|
Get this component's client frame.
Implements iAwsComponent. Definition at line 192 of file awsecomp.h. References iAwsComponent::ClientFrame. |
|
Get's the component above this one, NULL if there is none.
Implements iAwsComponent. Definition at line 305 of file awsecomp.h. References iAwsComponent::ComponentAbove. |
|
Get's the component below this one, NULL if there is none.
Implements iAwsComponent. Definition at line 309 of file awsecomp.h. References iAwsComponent::ComponentBelow. |
|
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. 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. Implements iAwsComponent. Definition at line 89 of file awsecomp.h. References iAwsComponent::AddChild, AWSF_CMP_NON_CLIENT, Flags, iAws::GetTopComponent, iAwsComponent::Layout, LinkAbove, Parent, SetID, SetParent, iAws::SetTopComponent, and Setup. |
|
Gets a child component by id, returns NULL on failure.
Implements iAwsComponent. Definition at line 242 of file awsecomp.h. References iAwsComponent::DoFindChild. |
|
Executes scriptable actions for this window.
Implements iAwsComponent. Definition at line 164 of file awsecomp.h. References iAwsComponent::Execute. |
|
Gets a child component by name, returns NULL on failure.
Implements iAwsComponent. Definition at line 239 of file awsecomp.h. References iAwsComponent::FindChild. |
|
Returns the current state of the flags.
Implements iAwsComponent. Definition at line 176 of file awsecomp.h. References iAwsComponent::Flags. Referenced by Create. |
|
Get this component's frame.
Implements iAwsComponent. Definition at line 188 of file awsecomp.h. References iAwsComponent::Frame. |
|
Get's the number of children.
Implements iAwsComponent. Definition at line 272 of file awsecomp.h. References iAwsComponent::GetChildCount. |
|
Gets the component owner for this (sources are embedded).
Implements iAwsSource. Definition at line 50 of file awsecomp.h. |
|
Get's the unique id of this component.
Implements iAwsComponent. Definition at line 232 of file awsecomp.h. References iAwsComponent::GetID. |
|
get the components insets, used by layout manager.
Implements iAwsComponent. Definition at line 398 of file awsecomp.h. References iAwsComponent::getInsets. |
|
get the components minimal size, used by layout manager.
Implements iAwsComponent. Definition at line 394 of file awsecomp.h. References iAwsComponent::getMinimumSize. |
|
get the components preferred size, used by layout manager.
Implements iAwsComponent. Definition at line 390 of file awsecomp.h. References iAwsComponent::getPreferredSize. |
|
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 156 of file awsecomp.h. References iAwsComponent::GetProperty. |
|
Get's a specific child.
Implements iAwsComponent. Definition at line 276 of file awsecomp.h. References iAwsComponent::GetTopChild. |
|
Event dispatcher, demultiplexes events and sends them off to the proper event handler.
Implements iAwsComponent. Definition at line 127 of file awsecomp.h. References csEventMouseData::Button, csEventKeyData::Char, csEventKeyData::Code, csevFrameStart, csevGainFocus, csevKeyDown, csevLostFocus, csevMouseClick, csevMouseDown, csevMouseEnter, csevMouseExit, csevMouseMove, csevMouseUp, iEvent::Key, csEventKeyData::Modifiers, iEvent::Mouse, OnFrame, OnGainFocus, OnKeypress, 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 280 of file awsecomp.h. References iAwsComponent::HasChildren. |
|
Hides a component.
Implements iAwsComponent. Definition at line 208 of file awsecomp.h. References iAwsComponent::Hide. |
|
Sets the embedded component. MUST BE CALLED BEFORE ANY OTHER FUNCTION!
Definition at line 68 of file awsecomp.h. References iBase::IncRef. |
|
Invalidation routine: allow component to be redrawn, but only part of it.
Implements iAwsComponent. Definition at line 184 of file awsecomp.h. References iAwsComponent::Invalidate. |
|
Invalidation routine: allow the component to be redrawn when you call this.
Implements iAwsComponent. Definition at line 180 of file awsecomp.h. References iAwsComponent::Invalidate. |
|
does the component listen to events ?
Implements iAwsComponent. Definition at line 402 of file awsecomp.h. References iAwsComponent::isDeaf. Referenced by SetDeaf. |
|
Returns the state of the hidden flag.
Implements iAwsComponent. Definition at line 204 of file awsecomp.h. References iAwsComponent::isHidden. |
|
Returns true if the component is maximized.
Implements iAwsComponent. Definition at line 245 of file awsecomp.h. References iAwsComponent::IsMaximized. |
|
Gets the layout manager for this component.
Implements iAwsComponent. Definition at line 382 of file awsecomp.h. References iAwsComponent::Layout. |
|
Resizes all the children of this component using the current layout.
Implements iAwsComponent. Definition at line 255 of file awsecomp.h. References iAwsComponent::LayoutChildren. |
|
Links a component into the hierarchy as a sibling above comp.
Implements iAwsComponent. Definition at line 446 of file awsecomp.h. References iAwsComponent::LinkAbove. Referenced by Create. |
|
Links a component into the hierarchy as a sibling below comp.
Implements iAwsComponent. Definition at line 450 of file awsecomp.h. References iAwsComponent::LinkBelow. |
|
Moves this component below all its siblings.
Implements iAwsComponent. Definition at line 325 of file awsecomp.h. References iAwsComponent::Lower. |
|
Maximizes this component.
Implements iAwsComponent. Definition at line 248 of file awsecomp.h. References iAwsComponent::Maximize. |
|
Moves a component.
Implements iAwsComponent. Definition at line 216 of file awsecomp.h. References iAwsComponent::Move. |
|
Moves a component to an absolute location.
Implements iAwsComponent. Definition at line 220 of file awsecomp.h. References iAwsComponent::MoveTo. |
|
Triggered when a child is added to the parent (triggered on the child).
Implements iAwsComponent. Definition at line 414 of file awsecomp.h. References iAwsComponent::OnAdded. |
|
Triggered when a child becomes hidden.
Implements iAwsComponent. Definition at line 434 of file awsecomp.h. References iAwsComponent::OnChildHide. |
|
Triggered when a child component has been moved.
Implements iAwsComponent. Definition at line 422 of file awsecomp.h. References iAwsComponent::OnChildMoved. |
|
Triggered when a child becomes shown.
Implements iAwsComponent. Definition at line 438 of file awsecomp.h. References iAwsComponent::OnChildShow. |
|
Triggered when the component needs to draw.
Implements iAwsComponent. Definition at line 338 of file awsecomp.h. References iAwsComponent::OnDraw. |
|
Triggered at the start of each frame.
Implements iAwsComponent. Definition at line 410 of file awsecomp.h. References iAwsComponent::OnFrame. Referenced by HandleEvent. |
|
Triggered when the keyboard focus is gained.
Implements iAwsComponent. Definition at line 378 of file awsecomp.h. References iAwsComponent::OnGainFocus. Referenced by HandleEvent. |
|
Triggered when the user presses a key.
Implements iAwsComponent. Definition at line 370 of file awsecomp.h. References iAwsComponent::OnKeypress. Referenced by HandleEvent. |
|
Triggered when the keyboard focus is lost.
Implements iAwsComponent. Definition at line 374 of file awsecomp.h. References iAwsComponent::OnLostFocus. Referenced by HandleEvent. |
|
Triggered when the Lower function is called.
Implements iAwsComponent. Definition at line 430 of file awsecomp.h. References iAwsComponent::OnLower. |
|
Triggered when the user clicks the mouse.
Implements iAwsComponent. Definition at line 354 of file awsecomp.h. References iAwsComponent::OnMouseClick. Referenced by HandleEvent. |
|
Triggered when the user double clicks the mouse.
Implements iAwsComponent. Definition at line 358 of file awsecomp.h. References iAwsComponent::OnMouseDoubleClick. |
|
Triggered when the user presses a mouse button down.
Implements iAwsComponent. Definition at line 342 of file awsecomp.h. References iAwsComponent::OnMouseDown. Referenced by HandleEvent. |
|
Triggered when this component gains mouse focus.
Implements iAwsComponent. Definition at line 366 of file awsecomp.h. References iAwsComponent::OnMouseEnter. Referenced by HandleEvent. |
|
Triggered when this component loses mouse focus.
Implements iAwsComponent. Definition at line 362 of file awsecomp.h. References iAwsComponent::OnMouseExit. Referenced by HandleEvent. |
|
Triggered when the user moves the mouse.
Implements iAwsComponent. Definition at line 350 of file awsecomp.h. References iAwsComponent::OnMouseMove. Referenced by HandleEvent. |
|
Triggered when the user unpresses a mouse button.
Implements iAwsComponent. Definition at line 346 of file awsecomp.h. References iAwsComponent::OnMouseUp. Referenced by HandleEvent. |
|
Triggered when the Raise function is called.
Implements iAwsComponent. Definition at line 426 of file awsecomp.h. References iAwsComponent::OnRaise. |
|
Triggered when a component is resized by the layout manager.
Implements iAwsComponent. Definition at line 418 of file awsecomp.h. References iAwsComponent::OnResized. |
|
Returns true if this window overlaps the given rect.
Implements iAwsComponent. Definition at line 200 of file awsecomp.h. References iAwsComponent::Overlaps. |
|
Get's the parent component of this component;.
Implements iAwsComponent. Definition at line 297 of file awsecomp.h. References iAwsComponent::Parent. Referenced by Create. |
|
Moves this component above all its siblings.
Implements iAwsComponent. Definition at line 321 of file awsecomp.h. References iAwsComponent::Raise. |
|
Gets the value of the redraw tag.
Implements iAwsComponent. Definition at line 333 of file awsecomp.h. References iAwsComponent::RedrawTag. |
|
Registers a slot for a signal.
Implements iAwsSource. Definition at line 54 of file awsecomp.h. References iAwsSource::RegisterSlot. |
|
Removes a child.
Implements iAwsComponent. Definition at line 268 of file awsecomp.h. References iAwsComponent::RemoveChild. |
|
Resizes a component.
Implements iAwsComponent. Definition at line 224 of file awsecomp.h. References iAwsComponent::Resize. |
|
Resizes a component to an absolute rect.
Implements iAwsComponent. Definition at line 228 of file awsecomp.h. References iAwsComponent::ResizeTo. |
|
Set's the component above this one.
Implements iAwsComponent. Definition at line 313 of file awsecomp.h. References iAwsComponent::SetComponentAbove. |
|
Set's the component below this one.
Implements iAwsComponent. Definition at line 317 of file awsecomp.h. References iAwsComponent::SetComponentBelow. |
|
let the component listen to events or not.
Implements iAwsComponent. Definition at line 406 of file awsecomp.h. References isDeaf, and iAwsComponent::SetDeaf. |
|
Sets the flag (can handle multiple simultaneous sets).
Implements iAwsComponent. Definition at line 168 of file awsecomp.h. References iAwsComponent::SetFlag. |
|
Set's the unique id of this component. Note: only to be used by window manager.
Implements iAwsComponent. Definition at line 236 of file awsecomp.h. References iAwsComponent::SetID. Referenced by Create. |
|
Set the layout manager.
Implements iAwsComponent. Definition at line 386 of file awsecomp.h. References iAwsComponent::SetLayout. |
|
Sets the parent component of this component;.
Implements iAwsComponent. Definition at line 301 of file awsecomp.h. References iAwsComponent::SetParent. Referenced by Create. |
|
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 160 of file awsecomp.h. References iAwsComponent::SetProperty. |
|
Sets the value of the redraw tag.
Implements iAwsComponent. Definition at line 329 of file awsecomp.h. References iAwsComponent::SetRedrawTag. |
|
Sets the top child.
Implements iAwsComponent. Definition at line 454 of file awsecomp.h. References iAwsComponent::SetTopChild. |
|
Sets up component.
Implements iAwsComponent. Definition at line 123 of file awsecomp.h. References iAwsComponent::Setup. Referenced by Create. |
|
Shows a component.
Implements iAwsComponent. Definition at line 212 of file awsecomp.h. References iAwsComponent::Show. |
|
Returns the named TYPE of the component, like "Radio Button", etc. This should always be overridden.
Implements iAwsComponent. Definition at line 196 of file awsecomp.h. References iAwsComponent::Type. |
|
Removes a component from the hierarchy.
Implements iAwsComponent. Definition at line 442 of file awsecomp.h. References iAwsComponent::Unlink. |
|
Returns the component to its unmaximized size.
Implements iAwsComponent. Definition at line 251 of file awsecomp.h. References iAwsComponent::UnMaximize. |
|
Unregisters a slot for a signal.
Implements iAwsSource. Definition at line 58 of file awsecomp.h. References iAwsSource::UnregisterSlot. |
|
Get's the window that this component resides in.
Implements iAwsComponent. Definition at line 293 of file awsecomp.h. References iAwsComponent::Window. |
|
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 289 of file awsecomp.h. References iAwsComponent::Window, and iAwsComponent::WindowManager. |