
Window.
Frames may be moved, resized and closed via user input.
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 |
| enum | CloseAction { DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, SELF_DELETE_ON_CLOSE } |
reactions to a press of the close button or a call to close More... | |
Public Member Functions | |
| void | add (Component *comp, const LayoutConstraint *cons) |
| adds a child | |
| void | clear () |
| removes all children | |
| void | close () |
| 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. | |
| Frame (const std::string &t="", bool autoReg=true) | |
| 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 |
| accesses this object's children | |
| ChildItrSP | getChildren () |
| accesses this object's children | |
| CloseAction | getCloseAction () const |
| Panel * | getContent () |
| provides access to the window's content panel | |
| const Panel * | getContent () const |
| provides access to the window's content panel | |
| 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 | |
| const FntSP & | getFont () const |
| Color | getForeground () const |
| accesses the color that should be used to render the object's foreground. | |
| const IMSP & | getInputMap () const |
| Widget * | getParent () const |
returns 0 - Window s have no parents | |
| 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 | |
| const std::string & | getTitle () const |
| bool | hasChildren () const |
| bool | hasFocus () const |
| checks if this object has the keyboard focus | |
| bool | isCloseable () const |
| bool | isEnabled () const |
| checks if this widget is enabled | |
| bool | isModal () const |
| checks if this window is modal | |
| bool | isMoveable () const |
| bool | isOpaque () const |
| checks this object's opacity | |
| bool | isResizable () const |
| virtual bool | isUnder (const Point &) const |
| virtual bool | isVisible () const |
| acesses the visibility property | |
| void | layout () |
| lays out this component's internal elements | |
| void | processKeyEvent (KeyEvent &) |
| notifies the widget of a key event | |
| void | processMouseMotion (MouseEvent &) |
| notifies the widget of a mouse motion | |
| void | processMousePress (MouseEvent &) |
| notifies the widget of a pressed mouse button | |
| void | processMouseRelease (MouseEvent &) |
| notifies the widget of a released mouse button | |
| void | releaseFocus () const |
| drops the input focus | |
| void | remove (Component *comp) |
| 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 | 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 | setCloseable (bool c) |
| void | setCloseAction (CloseAction a) |
| 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 | |
| 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 | setFont (const FntSP &f, bool laf=true) |
| 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 | setMoveable (bool m) |
| 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 | setResizable (bool r) |
| void | setSize (const int &w, const int &h) |
| void | setSize (const Size &s) |
| changes this object's size | |
| void | setTitle (const std::string &t) |
| virtual void | setVisible (bool vis) |
| void | updateUI () |
| ~Frame () | |
Protected Types | |
| typedef unsigned int | bits |
Protected Member Functions | |
| void | doDraw (Renderer2D *, const int &, const int &, const int &, const int &) |
| performs subclass-specific drawing | |
| bool | getBit (const bits &bit) const |
| void | layout (const Bounds &b) |
| 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 | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reactions to a press of the close button or a call to
|
|
||||||||||||
|
|
|
|
|
|
||||||||||||
|
adds a child
Implements ONE::gui::Widget. |
|
|
removes all children
Implements ONE::gui::Widget. |
|
|
|
|
||||||||||||||||||||||||
|
performs subclass-specific drawing
Implementations of this function may assume that this object is visible and that
Reimplemented from 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 the component's border
|
|
|
|
|
|
accesses this object's bounds
The
|
|
|
Reimplemented from ONE::gui::Window. |
|
|
accesses this object's children
If this object has no children, this function must return
Reimplemented from ONE::gui::Window. |
|
|
accesses this object's children
If this object has no children, this function must return
Reimplemented from ONE::gui::Window. |
|
|
|
|
|
provides access to the window's content panel
|
|
|
provides access to the window's content panel
|
|
|
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 from ONE::gui::Widget. |
|
|
|
|
|
Reimplemented from 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.
|
|
|
|
|
|
returns
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. Reimplemented from ONE::gui::Window. |
|
|
accesses this object's size
|
|
|
|
|
|
Reimplemented from 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 the content inside the given bounds. For compatibility reasons this function ignores any border set to this window. |
|
|
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. Reimplemented from 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 Reimplemented from ONE::gui::Window. |
|
|
notifies the widget of a mouse motion This event may occur both inside and outside of this object's bounds. Reimplemented from ONE::gui::Window. |
|
|
notifies the widget of a pressed mouse button
Implementations may assume that the mouse position is on this widget (i.e. Reimplemented from ONE::gui::Window. |
|
|
notifies the widget of a released mouse button This event may occur both inside and outside of this object's bounds. Reimplemented from ONE::gui::Window. |
|
|
drops the input focus
Implements ONE::gui::Control. |
|
|
removes a child
Implements ONE::gui::Widget. |
|
|
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 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. Reimplemented from ONE::gui::Widget. |
|
||||||||||||
|
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. |
|
|
Reimplemented from ONE::gui::Window. |
|
|
|
|
|
set when this object is scheduled to be laid out
|
|
|
opacity bit
|
|
|
|
|
|
visibility bit
|
1.4.3