VCF::Frame Class Reference
A frame is a component that houses other components, plus has special adornments used for interacting with it. More...
#include <vcf/ApplicationKit/Frame.h>
Inheritance diagram for VCF::Frame:

Public Types | |
| enum | FrameEventTypes { ACTIVATION_EVENT = CUSTOM_EVENT_TYPES + WINDOW_CONST + 6, CLOSE_EVENT = CUSTOM_EVENT_TYPES + WINDOW_CONST + 7, CLOSING_EVENT = CUSTOM_EVENT_TYPES + WINDOW_CONST + 8 } |
Public Member Functions | |
| Frame () | |
| virtual | ~Frame () |
| virtual void | setCaption (const String &caption) |
| Sets the caption for the frame. | |
| virtual String | getCaption () |
| The current text of the Frame's caption. | |
| virtual void | setClientBounds (Rect *bounds)=0 |
| Sets the client bounds only. | |
| virtual void | paint (GraphicsContext *context) |
| Paints the control. | |
| virtual void | show () |
| Shows the frame. | |
| virtual void | hide () |
| Hides the frame. | |
| virtual void | close ()=0 |
| Closes the Frame. | |
| virtual bool | isFrameTopmost () |
| Is this frame the top most frame amongst the application's current collection of frame windows. | |
| virtual void | setFrameTopmost (const bool &isTopmost) |
| Makes this frame a topmost floating window. | |
| virtual FrameStyleType | getFrameStyle () |
| returns the current frame style. | |
| virtual void | setFrameStyle (const FrameStyleType &frameStyle)=0 |
| Sets the frame style @ see FrameStyleType. | |
| bool | allowFrameAsChildControl () |
| By default a frame may have it's parent set to another control without becoming a child control itself. | |
| void | setAllowFrameAsChildControl (const bool &val) |
| bool | isActive () |
| Indicates whether or not this frame is active. | |
| virtual void | activate () |
| Activates this frame. | |
| virtual bool | allowsActivation ()=0 |
| Indicates to the framework whether or not this frame should allow activation. | |
| virtual void | setBorderPath (Path *path) |
| modifies the border of the frame to follow the series of points contained in the path. | |
| virtual void | setIconImage (Image *icon)=0 |
| Sets the icon image. | |
| virtual Image * | getIconImage ()=0 |
| Returns the current image for the frames icon. | |
| virtual bool | isActiveFrame ()=0 |
| void | setIsActive (const bool &active) |
| don't call - for internal use only | |
| virtual void | afterCreate (ComponentEvent *event) |
| Special initializations may then happen here. | |
| virtual bool | allowClose () |
| This method is called by the framework to determine whetehr or not the frame should actually be closed. | |
| void | setUseColorForBackground (const bool &val) |
| sets if we want to use the control's color to draw the control's background; otherwise the theme background is drawn. | |
| bool | getUseColorForBackground () |
| gets if we use the control's color to draw the control's background | |
| void | center (uint32 direction=fcdBoth) |
| The generic center function. | |
| void | centerOnShell (uint32 direction=fcdBoth) |
| Center the frame on the shell/desktop. | |
Static Public Member Functions | |
| static Frame * | getActiveFrame () |
| A static method uses to determine the current active frame. | |
| static void | internal_setActiveFrame (Frame *activeFrame) |
| don't call - for internal use only | |
| static Dialog * | createDialog (Class *dialogClazz, ResourceBundle *resBundle=NULL) |
| static Window * | createWindow (Class *windowClazz, ResourceBundle *resBundle=NULL) |
Public Attributes | |
| VCF::Delegate | FrameDelegate |
| VCF::Delegate | FrameClose |
| VCF::Delegate | WindowDelegate |
| VCF::Delegate | FrameActivation |
| VCF::Delegate | FrameClosing |
Protected Member Functions | |
| virtual void | destroy () |
| called by the free() method. | |
Protected Attributes | |
| String | caption_ |
| FrameStyleType | frameStyle_ |
| bool | isTopmostFrame_ |
| bool | useColorForBackground_ |
| bool | allowFrameAsChildControl_ |
Static Protected Attributes | |
| static Frame * | currentActiveFrame |
Classes | |
| class | State |
Detailed Description
A frame is a component that houses other components, plus has special adornments used for interacting with it.These can include minimize, maximize, restore, system, and help buttons on the caption bar, which is also part of the frame.
- Event Delegates for this class:
Member Enumeration Documentation
|
|
|
Constructor & Destructor Documentation
|
|
|
|
|
|
Member Function Documentation
|
|
Activates this frame. This base implementation activates the window only if is not already the active one. |
|
|
Special initializations may then happen here.
Reimplemented from VCF::Control. |
|
|
This method is called by the framework to determine whetehr or not the frame should actually be closed. This method is the first step in determining if a frame can be closed. If it returns true, then the FrameClosing is called. Note that the frame can still be prevented from closing depending on how the event handlers attached to the FrameClosing delegate are implemented. If this method returns false then the frame is not closed, and the FrameClosing event is not fired. |
|
|
By default a frame may have it's parent set to another control without becoming a child control itself.
|
|
|
Indicates to the framework whether or not this frame should allow activation. Som frames do not support becoming activated, for example the tooltip frame, or the frame that houses the dropdown list for the ComboBoxControl. Must be implemented by derived classes. Implemented in VCF::Dialog, VCF::PopupWindow, VCF::TransparentWindow, and VCF::Window. |
|
|
The generic center function. Centers the frame on owner by default or on screen when there is no owner. |
|
|
Center the frame on the shell/desktop.
|
|
|
Closes the Frame. Must be implemented by classes that derive from Frame. Implemented in VCF::Dialog, VCF::PopupWindow, VCF::TransparentWindow, and VCF::Window. |
|
||||||||||||
|
|
|
||||||||||||
|
|
|
|
called by the free() method. Should be overriden and any clean up code performed here Reimplemented from VCF::Control. Reimplemented in VCF::Window. |
|
|
A static method uses to determine the current active frame.
|
|
|
The current text of the Frame's caption.
|
|
|
returns the current frame style. This determines whether the frame is allowed to be resizeable through user interaction, or wether it's got a fixed size. This can also determine the border style of the frame.
|
|
|
Returns the current image for the frames icon.
Implemented in VCF::Dialog, VCF::PopupWindow, VCF::TransparentWindow, and VCF::Window. |
|
|
gets if we use the control's color to draw the control's background
|
|
|
Hides the frame. Dependending on the underlying windowing system, the frame may be minimized. |
|
|
don't call - for internal use only
|
|
|
Indicates whether or not this frame is active.
Reimplemented from VCF::Control. |
|
|
Implemented in VCF::Dialog, VCF::PopupWindow, VCF::TransparentWindow, and VCF::Window. |
|
|
Is this frame the top most frame amongst the application's current collection of frame windows.
|
|
|
Paints the control. Called by the underlying windowing system whenever the control needs to be painted. Note that in some cases the GraphicsContext passed in to this method may not be the same pointer as the GraphicsContext that the control holds itself. During the paint() method you should only use the context value for all your drawing and not the one returned in getContext(). The value returned by getContext() should be used for drawing that takes place outside of the paint() method. If the control allows paint notification, then the framework will fire an event to the BeforeControlPainted delegate prior to calling the control's paint() method. After the paint() method has returned, if the control allows paint notification, the framework will fire an event to the AfterControlPainted delegate. This allows outside observers to take part in the paint cycle, but beware that this does come at a bit of a cost, so use this feature sparingly. Note: This should NEVER be called by programmers using the VCF, it will be called for you during the course of your applications native event loop, and is only here for providing custom drawing routines for controls. In other words: you implement it, you never call it yourself.
Implements VCF::Control. Reimplemented in VCF::Dialog, VCF::PopupWindow, VCF::TransparentWindow, and VCF::Window. |
|
|
|
|
|
modifies the border of the frame to follow the series of points contained in the path.
Reimplemented in VCF::PopupWindow, VCF::TransparentWindow, and VCF::Window. |
|
|
Sets the caption for the frame. While the exact effects of calling this method depend on windowing system the VCF is running on, in general a caption is displayed on the top of the frame, and is generally a non client area. This method will change the text that is displayed there.
Reimplemented in VCF::Dialog, and VCF::Window. |
|
|
Sets the client bounds only.
Implemented in VCF::Dialog, VCF::PopupWindow, VCF::TransparentWindow, and VCF::Window. |
|
|
Sets the frame style @ see FrameStyleType.
Implemented in VCF::Dialog, VCF::PopupWindow, VCF::TransparentWindow, and VCF::Window. |
|
|
Makes this frame a topmost floating window. This is typically used for frames that want to behave like toolbars. Reimplemented in VCF::Window. |
|
|
Sets the icon image. The behaviour of this is partially windowing system dependent, and some systems (Mac OSX, for example, or some X11 window managers) may choose to ignore this. However, typically the icon is displayed in the top left corner of the frame, in the non client area that houses the caption. Implemented in VCF::Dialog, VCF::PopupWindow, VCF::TransparentWindow, and VCF::Window. |
|
|
don't call - for internal use only
|
|
|
sets if we want to use the control's color to draw the control's background; otherwise the theme background is drawn.
|
|
|
Shows the frame. Generally the same as calling Control::setVisible(true) It also activates it.
Reimplemented in VCF::Dialog, VCF::MessageDialog, and VCF::PopupWindow. |
Member Data Documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented in VCF::Window, VCF::Window, and VCF::Window. |
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/Frame.h
