
Component.
A Panel holds other Component s and lays them out according to an associated LayoutManager. Since panels are also Component s, they may be stacked. The Panel 's default LayoutManager is the horizontal StackLayout.
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 | |
| void | add (Component *comp, const LayoutConstraint *cons) |
| void | clear () |
| 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 BrdSP & | getBorder () const |
| accesses the component's border | |
| const BrdDSP & | getBorderDelegate () const |
| const Bounds & | getBounds () const |
| accesses this object's bounds | |
| int | getChildCount () const |
| ChildConstItrSP | getChildren () const |
| ChildItrSP | getChildren () |
| virtual const IMSP & | getDefaultInputMap () const |
| accesses this widget's default input map | |
| const UIDSP & | getDelegate () const |
| DelegateID | getDelegateID () const |
| 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 |
| LayoutManager * | getLayoutManager () const |
| provides access to the current layout manager. | |
| Widget * | getParent () const |
| const Point & | getPosition () const |
| accesses this object's position | |
| Size | getPreferredSize () const |
| determines this object's preferred size. | |
| const Size & | getSize () const |
| accesses this object's size | |
| bool | hasChildren () const |
| bool | hasFocus () const |
| checks if this component has the input focus | |
| bool | isEnabled () const |
| checks if this widget is enabled | |
| bool | isOpaque () const |
| checks this object's opacity | |
| virtual bool | isUnder (const Point &) const |
| virtual bool | isVisible () const |
| acesses the visibility property | |
| void | layout () |
delegates the laying out of this component to its LayoutManager | |
| Panel (LayoutManager *lm=new StackLayout()) | |
| initializes the member variables | |
| void | processKeyEvent (KeyEvent &) |
| does nothing | |
| void | processMouseMotion (MouseEvent &) |
| does nothing | |
| void | processMousePress (MouseEvent &) |
| does nothing | |
| void | processMouseRelease (MouseEvent &) |
| does nothing | |
| void | releaseFocus () const |
| drops the input focus | |
| void | remove (Component *comp) |
| bool | requestFocus () |
| requests the input focus for this component. | |
| void | scheduleLayout () |
schedules a call to layout | |
| void | setBackground (const Color &c, bool laf=true) |
| changes this object's background color | |
| void | setBorder (const BrdSP &b, bool laf=true) |
| changes the component's border | |
| 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 | setLayoutManager (LayoutManager *lm) |
| changes the layout manager | |
| void | setOpaque (bool o, bool laf=true) |
| changes this object's opacity | |
| void | setParent (Widget *p) |
| changes this component's parent | |
| 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) |
| void | updateUI () |
| ~Panel () | |
| destroys the panel | |
Protected Types | |
| typedef unsigned int | bits |
Protected Member Functions | |
| void | doDraw (Renderer2D *, const int &, const int &, const int &, const int &) |
| draws this container and the subcomponents within the given bounds | |
| 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 | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initializes the member variables
|
|
|
destroys the panel
This dtor |
|
||||||||||||
|
Reimplemented from ONE::gui::Component. |
|
|
the default implementation of this function does nothing Reimplemented from ONE::gui::Component. |
|
||||||||||||||||||||||||
|
draws this container and the subcomponents within the given bounds
Implements ONE::gui::Displayable. |
|
||||||||||||||||||||||||
|
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 the component's border
|
|
|
|
|
|
accesses this object's bounds
The
|
|
|
the default implementation of this function returns Reimplemented from ONE::gui::Component. |
|
|
the default implementation of this function returns Reimplemented from ONE::gui::Component. |
|
|
the default implementation of this function returns Reimplemented from ONE::gui::Component. |
|
|
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. |
|
|
|
|
|
Implements ONE::gui::Bordered. |
|
|
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.
|
|
|
|
|
|
provides access to the current layout manager.
|
|
|
Implements ONE::gui::Widget. |
|
|
accesses this object's position
|
|
|
determines this object's preferred size.
If this object has a non-degenerate preferred size (i.e. Implements ONE::gui::Displayable. |
|
|
accesses this object's size
|
|
|
the default implementation of this function returns Reimplemented from ONE::gui::Component. |
|
|
checks if this component has the input focus
This function queries the
Implements ONE::gui::Control. |
|
|
checks if this widget is enabled
Implements ONE::gui::Control. |
|
|
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
|
|
|
delegates the laying out of this component to its
Implements ONE::gui::Displayable. |
|
|
does nothing Panels don't react to user input. Implements ONE::gui::Control. |
|
|
does nothing Panels don't react to user input. Implements ONE::gui::Control. |
|
|
does nothing Panels don't react to user input. Implements ONE::gui::Control. |
|
|
does nothing Panels don't react to user input. Implements ONE::gui::Control. |
|
|
drops the input focus
Implements ONE::gui::Control. |
|
|
the default implementation of this function does nothing Reimplemented from ONE::gui::Component. |
|
|
requests the input focus for this component.
The
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 the component's border
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 layout manager
This function
|
|
||||||||||||
|
changes this object's opacity
The setting is active immediately. If
|
|
|
changes this component's parent If a previous parent was set, this component will be removed from it.
|
|
||||||||||||
|
|
|
|
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. |
|
|
Reimplemented from ONE::gui::Bordered. |
|
|
|
|
|
set when this object is scheduled to be laid out
|
|
|
opacity bit
|
|
|
|
|
|
visibility bit
|
1.4.3