
Top-Level objects may be displayed by themselves. Lower level Widget s can only be displayed if they are placed in TopLevel s. If so desired, new top level containers are automatically registered with the gui management classes. Those classes destroy all remaining windows at GUI subsystem shutdown. TopLevel s that are destroyed before that will automatically de-register themselves.
Public Types | |
| typedef ONE::util::ConstIterator< const Widget * > | ChildConstItr |
| typedef ONE::util::SmartPointer< ChildConstItr, ONE::util::DestructiveCopy > | ChildConstItrSP |
| typedef ONE::util::Iterator< Widget * > | ChildItr |
| typedef ONE::util::SmartPointer< ChildItr, ONE::util::DestructiveCopy > | ChildItrSP |
Public Member Functions | |
| virtual void | add (Component *comp, const LayoutConstraint *cons)=0 |
| adds a child | |
| virtual void | clear ()=0 |
| removes all children | |
| void | draw (Renderer2D *r, const int &x, const int &y, const int &w, const int &h) |
| draws a portion of this object | |
| void | draw (Renderer2D *) |
| draws this object. | |
| Color | getBackground () const |
| accesses the color that should be used to render the object's background. | |
| const Bounds & | getBounds () const |
| accesses this object's bounds | |
| virtual int | getChildCount () const =0 |
| virtual ChildConstItrSP | getChildren () const =0 |
| accesses this object's children | |
| virtual ChildItrSP | getChildren ()=0 |
| accesses this object's children | |
| virtual const IMSP & | getDefaultInputMap () const |
| accesses this widget's default input map | |
| const UIDSP & | getDelegate () const |
| virtual DelegateID | getDelegateID () const =0 |
| accesses the ID that identifies the object's UIDelegate type | |
| Color | getDisabledBackground () const |
| accesses the color that should be used to render the object's background when the object is disabled | |
| Color | getDisabledForeground () const |
| accesses the color that should be used to render the object's foreground when the object is disabled. | |
| Color | getFocus () const |
| accesses the color that should be used to render the component focus | |
| Color | getForeground () const |
| accesses the color that should be used to render the object's foreground. | |
| const IMSP & | getInputMap () const |
| virtual Widget * | getParent () const =0 |
| const Point & | getPosition () const |
| accesses this object's position | |
| virtual Size | getPreferredSize () const =0 |
| determines this object's preferred size. | |
| const Size & | getSize () const |
| accesses this object's size | |
| virtual bool | hasChildren () const =0 |
| bool | hasFocus () const |
| checks if this object has the keyboard focus | |
| bool | isEnabled () const |
| checks if this widget is enabled | |
| bool | isModal () const |
| checks if this window is modal | |
| bool | isOpaque () const |
| checks this object's opacity | |
| virtual bool | isUnder (const Point &) const |
| virtual bool | isVisible () const |
| acesses the visibility property | |
| virtual void | layout ()=0 |
| lays out this component's internal elements | |
| virtual void | processKeyEvent (KeyEvent &evt)=0 |
| notifies the widget of a key event | |
| virtual void | processMouseMotion (MouseEvent &evt)=0 |
| notifies the widget of a mouse motion | |
| virtual void | processMousePress (MouseEvent &evt)=0 |
| notifies the widget of a pressed mouse button | |
| virtual void | processMouseRelease (MouseEvent &evt)=0 |
| notifies the widget of a released mouse button | |
| void | releaseFocus () const |
| drops the input focus | |
| virtual void | remove (Component *comp)=0 |
| removes a child | |
| bool | requestFocus () |
| attempts to get the input focus for this object | |
| void | scheduleLayout () |
schedules a call to layout | |
| void | setBackground (const Color &c, bool laf=true) |
| changes this object's background color | |
| void | setBounds (const int &x, const int &y, const int &w, const int &h) |
| void | setBounds (const Bounds &b) |
| changes this object's bounds | |
| void | setDisabledBackground (const Color &c, bool laf=true) |
| changes this object's disabled background color | |
| void | setDisabledForeground (const Color &c, bool laf=true) |
| changes this object's disabled foreground color | |
| virtual void | setEnabled (bool) |
| enables or disables this component | |
| void | setFocus (const Color &c, bool laf=true) |
| changes the color that will be used to draw the component focus marker | |
| void | setForeground (const Color &c, bool laf=true) |
| changes this object's foreground color | |
| void | setInputMap (const IMSP &im, bool laf=true) |
| void | setModal (bool modal) |
| changes the modality of this window | |
| void | setOpaque (bool o, bool laf=true) |
| changes this object's opacity | |
| void | setPosition (const int &x, const int &y) |
| void | setPosition (const Point &p) |
| changes this object's position | |
| void | setPreferredSize (const Size &s) |
| sets the object's preferred size | |
| void | setSize (const int &w, const int &h) |
| void | setSize (const Size &s) |
| changes this object's size | |
| virtual void | setVisible (bool vis) |
| TopLevel (bool autoRegister=true) | |
| creates a new top level container | |
| virtual void | updateUI () |
| virtual | ~TopLevel () |
Protected Types | |
| typedef unsigned int | bits |
Protected Member Functions | |
| virtual void | doDraw (Renderer2D *r, const int &x, const int &y, const int &w, const int &h)=0 |
| performs subclass-specific drawing | |
| bool | getBit (const bits &bit) const |
| void | setBit (const bits &bit, bool val) |
Protected Attributes | |
| Size | prefSize |
Static Protected Attributes | |
| static const bits | ENABLED |
| static const bits | LSCHED |
| set when this object is scheduled to be laid out | |
| static const bits | OPQ |
| opacity bit | |
| static const bits | VIS |
| visibility bit | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
creates a new top level container
If |
|
|
|
|
||||||||||||
|
adds a child
Implemented in ONE::gui::Component, ONE::gui::Panel, and ONE::gui::Window. |
|
|
removes all children
Implemented in ONE::gui::Component, ONE::gui::Panel, and ONE::gui::Window. |
|
||||||||||||||||||||||||
|
performs subclass-specific drawing
Implementations of this function may assume that this object is visible and that
Implemented in ONE::gui::Console, ONE::gui::Frame, ONE::gui::Label, ONE::gui::List, ONE::gui::Panel, ONE::gui::Picture, ONE::gui::ScrollBar, ONE::gui::ScrollBarSlider, ONE::gui::TextField, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window. |
|
||||||||||||||||||||||||
|
draws a portion of this object
This function calls
|
|
|
draws this object.
This function calls |
|
|
accesses the color that should be used to render the object's background.
|
|
|
|
|
|
accesses this object's bounds
The
|
|
|
Implemented in ONE::gui::Component, ONE::gui::Console, ONE::gui::Frame, ONE::gui::Panel, ONE::gui::ScrollBar, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window. |
|
|
accesses this object's children
If this object has no children, this function must return
Implemented in ONE::gui::Component, ONE::gui::Console, ONE::gui::Frame, ONE::gui::Panel, ONE::gui::ScrollBar, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window. |
|
|
accesses this object's children
If this object has no children, this function must return
Implemented in ONE::gui::Component, ONE::gui::Console, ONE::gui::Frame, ONE::gui::Panel, ONE::gui::ScrollBar, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window. |
|
|
accesses this widget's default input map The default implementation returns an empty map. Subclasses may override this function in order to specify a different default map.
Reimplemented in ONE::gui::AbstractButton, ONE::gui::CommandField, ONE::gui::Frame, ONE::gui::List, and ONE::gui::ScrollBarSlider. |
|
|
|
|
|
accesses the ID that identifies the object's UIDelegate type
Subclasses of this class must override this function in order to receive a proper delegate. See
Implemented in ONE::gui::Button, ONE::gui::CheckBox, ONE::gui::Console, ONE::gui::Frame, ONE::gui::Label, ONE::gui::List, ONE::gui::Panel, ONE::gui::Picture, ONE::gui::RadioButton, ONE::gui::ScrollBar, ONE::gui::ScrollBarSlider, ONE::gui::TextField, ONE::gui::TitleBar, ONE::gui::ToggleButton, ONE::gui::Viewport, and ONE::gui::Window. |
|
|
accesses the color that should be used to render the object's background when the object is disabled
|
|
|
accesses the color that should be used to render the object's foreground when the object is disabled.
|
|
|
accesses the color that should be used to render the component focus
|
|
|
accesses the color that should be used to render the object's foreground.
|
|
|
|
|
|
Implemented in ONE::gui::Component, and ONE::gui::Window. |
|
|
accesses this object's position
|
|
|
determines this object's preferred size.
If this object has a non-degenerate preferred size (i.e. Implemented in ONE::gui::Console, ONE::gui::Frame, ONE::gui::Label, ONE::gui::List, ONE::gui::Panel, ONE::gui::Picture, ONE::gui::ScrollBar, ONE::gui::ScrollBarSlider, ONE::gui::TextField, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window. |
|
|
accesses this object's size
|
|
|
Implemented in ONE::gui::Component, ONE::gui::Console, ONE::gui::Frame, ONE::gui::Panel, ONE::gui::ScrollBar, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window. |
|
|
checks if this object has the keyboard focus
Implements ONE::gui::Control. |
|
|
checks if this widget is enabled
Implements ONE::gui::Control. |
|
|
checks if this window is modal Modal windows cannot lose the input focus to another window.
|
|
|
checks this object's opacity objects that are set to not opaque (i.e. transparent) should not draw their background display.
|
|
|
This implementation checks if the given point is within the widget's bounds and then queries the delegate. Implements ONE::gui::Control. Reimplemented in ONE::gui::Picture. |
|
|
acesses the visibility property
The default value is
|
|
|
lays out this component's internal elements
This function may not change this object's bounds. Implementations should lay out their internal elements according to the currently set bounds. Implemented in ONE::gui::Console, ONE::gui::Frame, ONE::gui::Label, ONE::gui::List, ONE::gui::Panel, ONE::gui::Picture, ONE::gui::ScrollBar, ONE::gui::ScrollBarSlider, ONE::gui::TextField, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window. |
|
|
notifies the widget of a key event
If this is not a top level container and the widget processes the event, it must call the events Implemented in ONE::gui::AbstractButton, ONE::gui::CommandField, ONE::gui::Console, ONE::gui::Frame, ONE::gui::Label, ONE::gui::List, ONE::gui::Panel, ONE::gui::Picture, ONE::gui::ScrollBar, ONE::gui::ScrollBarSlider, ONE::gui::TextField, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window. |
|
|
notifies the widget of a mouse motion This event may occur both inside and outside of this object's bounds. Implemented in ONE::gui::AbstractButton, ONE::gui::Console, ONE::gui::Frame, ONE::gui::Label, ONE::gui::List, ONE::gui::Panel, ONE::gui::Picture, ONE::gui::ScrollBar, ONE::gui::ScrollBarSlider, ONE::gui::TextField, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window. |
|
|
notifies the widget of a pressed mouse button
Implementations may assume that the mouse position is on this widget (i.e. Implemented in ONE::gui::AbstractButton, ONE::gui::Console, ONE::gui::Frame, ONE::gui::Label, ONE::gui::List, ONE::gui::Panel, ONE::gui::Picture, ONE::gui::ScrollBar, ONE::gui::ScrollBarSlider, ONE::gui::TextField, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window. |
|
|
notifies the widget of a released mouse button This event may occur both inside and outside of this object's bounds. Implemented in ONE::gui::AbstractButton, ONE::gui::Console, ONE::gui::Frame, ONE::gui::Label, ONE::gui::List, ONE::gui::Panel, ONE::gui::Picture, ONE::gui::ScrollBar, ONE::gui::ScrollBarSlider, ONE::gui::TextField, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window. |
|
|
drops the input focus
Implements ONE::gui::Control. |
|
|
removes a child
Implemented in ONE::gui::Component, ONE::gui::Panel, and ONE::gui::Window. |
|
|
attempts to get the input focus for this object
The function may not succeed in acquiring the focus in some situations. For example, calling this function on a top level container while a modal
Implements ONE::gui::Control. |
|
|
schedules a call to
This function makes component layout more efficient as several calls to this function within one frame duration result in only one call to |
|
||||||||||||
|
changes this object's background color
The setting is active immediately. If
|
|
||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
|
changes this object's bounds
See
|
|
||||||||||||
|
changes this object's disabled background color
The setting is active immediately. If
|
|
||||||||||||
|
changes this object's disabled foreground color
The setting is active immediately. If
|
|
|
enables or disables this component Disabled components no longer react to user input. If this object has children, they are modified accordingly. Implements ONE::gui::Control. Reimplemented in ONE::gui::Button, ONE::gui::Console, ONE::gui::Frame, and ONE::gui::TitleBar. |
|
||||||||||||
|
changes the color that will be used to draw the component focus marker
The setting is active immediately. If
|
|
||||||||||||
|
changes this object's foreground color
The setting is active immediately. If
|
|
||||||||||||
|
|
|
|
changes the modality of this window If another window is already set to modal, that window will lose its status, as there can obviously only be one modal window.
|
|
||||||||||||
|
changes this object's opacity
The setting is active immediately. If
|
|
||||||||||||
|
|
|
|
changes this object's position Note that this function does not request a re-layout.
|
|
|
sets the object's preferred size If the value is set to an empty size object, the component will calculate its preferred size.
|
|
||||||||||||
|
|
|
|
changes this object's size Note that this function does not request a re-layout.
|
|
|
This function releases the input focus if the widget is set to invisible. Reimplemented from ONE::gui::Displayable. |
|
|
Updates the super class and the widget's Reimplemented from ONE::gui::Displayable. Reimplemented in ONE::gui::AbstractButton, ONE::gui::CheckBox, ONE::gui::CommandField, ONE::gui::Console, ONE::gui::Frame, ONE::gui::Label, ONE::gui::List, ONE::gui::Panel, ONE::gui::RadioButton, ONE::gui::ScrollBar, ONE::gui::TextField, ONE::gui::TitleBar, ONE::gui::Viewport, and ONE::gui::Window. |
|
|
|
|
|
set when this object is scheduled to be laid out
|
|
|
opacity bit
|
|
|
|
|
|
visibility bit
|
1.4.3