Inheritance diagram for os::PopupMenu:

Public Member Functions | |
| PopupMenu (const Rect &, const String &, const String &, Menu *pcMenu=NULL, Image *pcImage=NULL, uint32 nResizeMask=CF_FOLLOW_LEFT|CF_FOLLOW_TOP, uint32 nFlags=WID_FULL_UPDATE_ON_RESIZE|WID_WILL_DRAW) | |
| Initialize the popupmenu. | |
| ~PopupMenu () | |
| void | SetIcon (Image *) |
| Sets the icon that will be attached to the PopupMenu. | |
| Image * | GetIcon () |
| Gets the icon that is attached to the PopupMenu. | |
| String | GetLabel () |
| Gets the label of the PopupMenu. | |
| void | SetLabel (const String &) |
| Sets the label of the PopupMenu. | |
| bool | IsEnabled () |
| Tells the programmer whether this element is enabled or disabled. | |
| void | SetEnabled (bool, bool bValidate=false) |
| Tells the system to disable or enable this element. | |
| void | SetDrawArrow (bool bArrow) |
| Tells the element whether you want the arrow icon attached to the PopupMenu. | |
| virtual void | Paint (const Rect &) |
| Called by the system update "damaged" areas of the view. | |
| virtual void | MouseDown (const Point &, uint32) |
| Hook called by the system when a mouse button is pressed. | |
| virtual void | MouseUp (const Point &cPosition, uint32 nButtons, Message *pcData) |
| Hook called by the system when a mouse button is release. | |
| virtual void | MouseMove (const Point &cPosition, int nCode, uint32 nButtons, Message *pcData) |
| Hook called by the system when the mouse is moved. | |
| Point | GetPreferredSize (bool bLargest) const |
Classes | |
| class | Private |
| PopupMenu::PopupMenu | ( | const Rect & | cFrame, | |
| const String & | cName, | |||
| const String & | cLabel, | |||
| Menu * | pcMenu = NULL, |
|||
| Image * | pcIcon = NULL, |
|||
| uint32 | nResizeMask = CF_FOLLOW_LEFT|CF_FOLLOW_TOP, |
|||
| uint32 | nFlags = WID_FULL_UPDATE_ON_RESIZE | WID_WILL_DRAW | |||
| ) |
| cFrame | - The size and position of the popupmenu. | |
| cName | - The name of the popupmenu. | |
| cLabel | - The label written on the popupmenu. | |
| pcMenu | - The menu that will be displayed when you click the popupmenu. Caveat: You must set the menu to a handler or a meessenger(Menu::SetTargetForItems()) | |
| pcIcon | - The image displyed on popupmenu. | |
| nResizeMask | - Determines what way the popupmenu will follow the rest of the window. Default is CF_FOLLOW_LEFT|CF_FOLLOW_TOP. | |
| nFlags | - Deteremines what flags will be sent to the popupmenu. Default is WID_WILL_DRAW | WID_CLEAR_BACKGROUND | WID_FULL_UPDATE_ON_RESIZE |
| PopupMenu::~PopupMenu | ( | ) |
| void PopupMenu::SetIcon | ( | Image * | pcIcon | ) |
| Image * PopupMenu::GetIcon | ( | ) |
| String PopupMenu::GetLabel | ( | ) |
..
| void PopupMenu::SetLabel | ( | const String & | cString | ) |
..
| cString | - The string that you want to set it to. |
| bool PopupMenu::IsEnabled | ( | void | ) |
..
| void PopupMenu::SetEnabled | ( | bool | bEnabled, | |
| bool | bValidate = false | |||
| ) |
..
| bEnabled | - To enable this element set this to true(default) and to disable set this to false. |
| void PopupMenu::SetDrawArrow | ( | bool | bArrow | ) |
..
| bArrow | - To enable the arrow icon set this to true(default) and to disable set this to false. |
| void PopupMenu::Paint | ( | const Rect & | cRect | ) | [virtual] |
| cUpdateRect | A rectangle enclosing all damaged areas. This is just a rough "worst-case", further fine-grained clipping will be performed by the Application Server to avoid updating non-damaged pixels and make the update as fast and flicker-free as possible. |
Reimplemented from os::View.
| void PopupMenu::MouseDown | ( | const Point & | cPos, | |
| uint32 | nButtons | |||
| ) | [virtual] |
| cPosition | Mouse position in the views coordinate system at the time the mouse was pressed. | |
| nButtons | Index of the pressed button. Buttons start at 1 for the left button, 2 for the right button, 3 for the middle button. Additional buttons might be supported by the mouse driver and will then be assigned numbers from 4 and up. |
Reimplemented from os::View.
pcData member will point to a Message containing the dragged data. Look at BeginDrag() for a more detailed description of the drag and drop system. | cPosition | Mouse position in the views coordinate system at the time the mouse was pressed. | |
| nButtons | Index of the pressed button. Buttons start at 1 for the left button, 2 for the right button, 3 for the middle button. Additional buttons might be supported by the mouse driver and will then be assigned numbers from 4 and up. | |
| pcData | Pointer to a Message object containing the dragged data if this mouse-up was the end of a drag and drop operation. If no data was dragged it will be NULL. |
Reimplemented from os::View.
| void PopupMenu::MouseMove | ( | const Point & | cPosition, | |
| int | nCode, | |||
| uint32 | nButtons, | |||
| Message * | pcData | |||
| ) | [virtual] |
| cNewPos | New mouse position given in the views coordinate system. | |
| nCode | Enter/exit code. This is MOUSE_ENTERED when the mouse first enter the view, MOUSE_EXITED when the mouse leaves the view, MOUSE_INSIDE whenever the mouse move withing the boundary of the view and MOUSE_OUTSIDE when the mouse move outside the view (will only happen if the view has focus). | |
| nButtons | Bitmask telling which buttons that are currently pressed. Bit 0 is button 1 (left), bit 1 is button 2 (right), and bit 2 is button 3 (middle), and so on. | |
| pcData | Pointer to a Message object containing the dragged data if the user is in the middle of a drag and drop operation. Otherwise this pointer is NULL. Look at BeginDrag() for a more detailed description of the drag and drop system. |
Reimplemented from os::View.
1.5.1