smjg.libs.sdwf.menu.Menu Class Reference

The smjg.libs.sdwf.menu.Menu abstract class represents a menu bar or drop-down menu. More...

Inheritance diagram for smjg.libs.sdwf.menu.Menu:

smjg.libs.sdwf.menu.MenuBar smjg.libs.sdwf.menu.MenuPopup

List of all members.

Public Member Functions

HMENU handle ()
 The Windows handle of the menu.
void addAtBottom (MenuItem item)
 Adds a new item at the bottom of this menu.
void add (int index, MenuItem item)
 Adds an item to this menu at the given position.
void remove (int index)
 Removes an item from this menu.
void refresh ()
 Refreshes the item list of this Menu object.
 ~this ()
Properties
final override uint toHash ()
 Returns the hash value of this Menu.
int length ()
 The number of items in this menu.
Operators
final override intBool opEquals (Object o)
final bool opEquals (Menu a)
Menu opCatAssign (MenuItem item)
 Adds a new item at the bottom of this menu.
MenuItem opIndex (int index)
 Gets an item from the menu by index.

Protected Member Functions

 this (HMENU h, bool autoDelete)
bool shouldDelete ()
void update (MenuItem it)
void updateDisplay ()


Detailed Description

The smjg.libs.sdwf.menu.Menu abstract class represents a menu bar or drop-down menu.

Since:
0.5

Constructor & Destructor Documentation

smjg.libs.sdwf.menu.Menu.this ( HMENU  h,
bool  autoDelete 
) [protected]

Reimplemented in smjg.libs.sdwf.menu.MenuBar, and smjg.libs.sdwf.menu.MenuPopup.

smjg.libs.sdwf.menu.Menu.~this (  ) 


Member Function Documentation

HMENU smjg.libs.sdwf.menu.Menu.handle (  ) 

The Windows handle of the menu.

void smjg.libs.sdwf.menu.Menu.addAtBottom ( MenuItem  item  ) 

Adds a new item at the bottom of this menu.

Parameters:
item item to add to this menu.
Precondition:
The item must not already be in a menu.
Status:
done

void smjg.libs.sdwf.menu.Menu.add ( int  index,
MenuItem  item 
)

Adds an item to this menu at the given position.

Parameters:
index zero-based index of position at which to insert the item.
item item to add to this menu.
Precondition:
The item must not already be in a menu.
Status:
test further

void smjg.libs.sdwf.menu.Menu.remove ( int  index  ) 

Removes an item from this menu.

Parameters:
index zero-based index of item to remove.
Status:
test further

void smjg.libs.sdwf.menu.Menu.refresh (  ) 

Refreshes the item list of this Menu object.

This is primarily for internal use, but applications can also use it in case the menu can be modified by means external to the Menu and MenuItem SDWF objects.

Limitations:
For simplicity, this method recreates MenuItem objects from scratch. This means that all MenuItem and MenuPopup objects descended from this Menu object are invalidated by a call to this method. The only internal calls to this method are when the Menu object is first created, so there is no need to worry about this if your application doesn't call it.
Status:
done

final override uint smjg.libs.sdwf.menu.Menu.toHash (  ) 

Returns the hash value of this Menu.

Returns:
the hash value, defined by the menu's handle.
Since:
0.4

int smjg.libs.sdwf.menu.Menu.length (  ) 

The number of items in this menu.

final override intBool smjg.libs.sdwf.menu.Menu.opEquals ( Object  o  ) 

Determines whether this Menu object is equal to another object.

final bool smjg.libs.sdwf.menu.Menu.opEquals ( Menu  a  ) 

Determines whether this Menu is equal to another Menu. Two Menu objects are equal iff they have the same handle, i.e. they interface the same Windows menu instance.

Menu smjg.libs.sdwf.menu.Menu.opCatAssign ( MenuItem  item  ) 

Adds a new item at the bottom of this menu.

(Implementation of this ~= item.)

This operator is syntatic sugar for addAtBottom(item).

Parameters:
item item to add to this menu.
Returns:
this menu.
Precondition:
The item must not already be in a menu.
Status:
done

MenuItem smjg.libs.sdwf.menu.Menu.opIndex ( int  index  ) 

Gets an item from the menu by index.

Parameters:
index zero-based index of item to retrieve.
Returns:
the requested item.
Status:
done

bool smjg.libs.sdwf.menu.Menu.shouldDelete (  )  [protected]

Reimplemented in smjg.libs.sdwf.menu.MenuBar, and smjg.libs.sdwf.menu.MenuPopup.

void smjg.libs.sdwf.menu.Menu.update ( MenuItem  it  )  [protected]

void smjg.libs.sdwf.menu.Menu.updateDisplay (  )  [protected]

Reimplemented in smjg.libs.sdwf.menu.MenuBar.


The documentation for this class was generated from the following file:
Generated on Sun Jan 11 21:54:15 2009 for Stewart's D Windows Framework by  doxygen 1.5.4