Pyro higlevel API
Public Member Functions | List of all members
os::MenuSeparator Class Reference

Menu separator item. More...

Inheritance diagram for os::MenuSeparator:
os::MenuItem os::Invoker

Public Member Functions

 MenuSeparator ()
 
 ~MenuSeparator ()
 internal More...
 
virtual Point GetContentSize ()
 Gets the size of the separator... More...
 
virtual void Draw ()
 Draws the os::MenuSeparator. More...
 
virtual void DrawContent ()
 
virtual void SetHighlighted (bool bHighlight)
 Tells the system to highlight or unhighlight this element... More...
 
virtual bool IsSelectable () const
 Tells the system whether or not this item can be selected. More...
 
- Public Member Functions inherited from os::MenuItem
 MenuItem (const String &cLabel, Message *pcMsg, const String &cShortcut="", Image *pcImage=NULL)
 Constructor. More...
 
 MenuItem (Menu *pcMenu, Message *pcMsg, const String &cShortcut="", Image *pcImage=NULL)
 Constructor. More...
 
 ~MenuItem ()
 internal More...
 
MenuGetSubMenu () const
 Gets the Sub Menu(Menu that is inside the MenuItem)... More...
 
MenuGetSuperMenu () const
 Gets the Super Menu(Menu that holds the MenuItem)... More...
 
Rect GetFrame () const
 Gets the frame of the MenuItem... More...
 
virtual float GetColumnWidth (int nColumn) const
 Gets the size of a column. More...
 
virtual int GetNumColumns () const
 Get number of columns. More...
 
const StringGetLabel () const
 Gets the label of the MenuItem... More...
 
void SetLabel (const os::String &cTitle)
 Sets the label of the MenuItem... More...
 
Point GetContentLocation () const
 Returns the current location of this item... More...
 
virtual bool Invoked (Message *pcMessage)
 Intercept outgoing messages. More...
 
void SetEnable (bool bEnabled)
 Tells the system to disable or enable this element... More...
 
bool IsEnabled () const
 Tells the programmer whether this element is enabled or disabled... More...
 
bool IsHighlighted () const
 Tells the programmer whether this element is highlighted or not highlighted... More...
 
ImageGetImage () const
 Gets the image that is attached to the MenuItem... More...
 
void SetImage (Image *pcImage, bool bRefresh=false)
 Sets the image that you want to attach to the MenuItem... More...
 
void SetShortcut (const String &cShortcut)
 Sets the shortcut for the MenuItem. More...
 
const StringGetShortcut () const
 Gets the shortcut for the menu item... More...
 
- Public Member Functions inherited from os::Invoker
 Invoker ()
 Default constructor. More...
 
 Invoker (Message *pcMessage)
 Constructor. More...
 
 Invoker (Message *pcMessage, const Handler *pcHandler, const Looper *pcLooper=NULL)
 Constructor. More...
 
 Invoker (Message *pcMessage, const Messenger &cTarget)
 Constructor. More...
 
virtual ~Invoker ()
 Destructor. More...
 
virtual status_t SetMessage (Message *pcMessage)
 Assign a new message to the invoker. More...
 
MessageGetMessage () const
 Get the message currently assigned to the invoker. More...
 
uint32 GetCode () const
 Get the code field from the currently assigned message. More...
 
virtual void TargetChanged (const Messenger &cOldTarget)
 Virtual hook called by the system after the target has been changed. More...
 
virtual void MessageChanged (const Message &cOldMsg)
 Virtual hook called by the system after the message has been changed. More...
 
virtual status_t SetTarget (const Handler *pcHandler, const Looper *pcLooper=NULL)
 Set a new message target. More...
 
virtual status_t SetTarget (const Messenger &cMessenger)
 Set a new message target. More...
 
bool IsTargetLocal () const
 Check if the target lives in our process. More...
 
HandlerGetTarget (Looper **ppcLooper=NULL) const
 Get the current target. More...
 
Messenger GetMessenger () const
 Get the messenger used to target messages sendt by the invoker. More...
 
virtual status_t SetHandlerForReply (Handler *pcHandler)
 Set a reply target for messages sendt by this messenger. More...
 
HandlerGetHandlerForReply () const
 Get the current reply target for replies on messages sendt by the invoker. More...
 
virtual status_t Invoke (Message *pcMessage=NULL)
 Send the current message to the current target. More...
 

Detailed Description

Description:
A os::MenuSeparator can be inserted to a menu to categorize other items. The separator will draw an etched line in the menu.
Since
0.3.7
See Also
os::MenuItem, os::Menu
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

Constructor & Destructor Documentation

MenuSeparator::MenuSeparator ( )
MenuSeparator::~MenuSeparator ( )

Member Function Documentation

void MenuSeparator::Draw ( )
virtual
Description:
This method draws the Separator, make sure you call Flush() before calling this method.
See Also
os::View::Draw()
Author
Kurt Skauen with modifications by the Syllable Team.

Reimplemented from os::MenuItem.

References os::Rect::bottom, os::COL_MENU_BACKGROUND, os::COL_SHADOW, os::COL_SHINE, os::View::DrawLine(), os::View::FillRect(), os::get_default_color(), os::View::GetBounds(), os::MenuItem::GetFrame(), os::Menu::GetLayout(), os::MenuItem::GetSuperMenu(), os::Rect::Height(), os::ITEMS_IN_ROW, os::Rect::left, os::Rect::right, os::View::SetFgColor(), os::Rect::top, and os::Rect::Width().

void MenuSeparator::DrawContent ( )
virtual
Point MenuSeparator::GetContentSize ( )
virtual
Description:
Gets the size of the separator.
Returns
This method returns the size as an os::Point.
See Also
Author
Kurt Skauen(with modifications from the Syllable team)

Reimplemented from os::MenuItem.

References os::View::GetFontHeight(), os::Menu::GetLayout(), os::MenuItem::GetSuperMenu(), and os::ITEMS_IN_ROW.

virtual bool os::MenuSeparator::IsSelectable ( ) const
inlinevirtual
Description:
Tells the system whether or not this item can be selected.
Author
Rick Caudill(sylla.nosp@m.ble@.nosp@m.sylla.nosp@m.ble-.nosp@m.desk..nosp@m.tk)

Reimplemented from os::MenuItem.

void MenuSeparator::SetHighlighted ( bool  bHighlighted)
virtual
Description:
This method will tell the system to highlight or unhighlight this element.
Parameters
bHighlighted- To highlight this element set this to true(default) and to unhighlight set this to false.
See Also
IsHighlighted()
Author
Rick Caudill (sylla.nosp@m.ble_.nosp@m.deskt.nosp@m.op@h.nosp@m.otpop.nosp@m..com)

Reimplemented from os::MenuItem.