|
OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Derived from TDrawItemProxy, TDrawMenuItemProxy is a proxy parent for TDrawMenuItem. More...
#include <owl/drawitem.h>
Public Types | |
| typedef TTypedArray< uint, uint, TStandardAllocator > | TUIntAray |
| Container of TDrawItem's. | |
| Public Types inherited from owl::TDrawItemProxy | |
| typedef TIPtrArray< TDrawItem * > | TDrawItemArray |
Public Member Functions | |
| TDrawMenuItemProxy (TResId resId, TModule *module=&GetGlobalModule()) | |
| Constructs a TDrawMenuItemProxy object using the specified resource. | |
| virtual | ~TDrawMenuItemProxy () |
| Destroys the instance. | |
| TDrawItem * | FindItem (uint cmdId) |
| Returns the TDrawItem with id cmdId, or 0 if it doesn't exist. | |
| void | RemapMenu (HMENU hMenu) |
| Walks through the menu tree hMenu adding seperators. | |
| bool | EvMenuChar (uint uChar, uint, HMENU hMenu, TParam2 ¶m) |
| Returns true if a shortcut was pressed that fits into the menu and false if not. | |
| Public Member Functions inherited from owl::TDrawItemProxy | |
| TDrawItemProxy (TFont *font=0) | |
| Constructs a TDrawItemProxy object using the specified font. | |
| virtual | ~TDrawItemProxy () |
| Deletes Font. If DeleteCel is true, delets CelArray. | |
| void | SetFont (TFont *font) |
| Deletes Font and sets it to font. | |
| virtual TFont * | GetFont () |
| void | SetCelArray (TCelArray *celarray, TAutoDelete del=AutoDelete) |
| If DeleteCel is true, deletes CelArray. | |
| void | SetCelArray (TResId resId, uint count, TModule *module=&GetGlobalModule()) |
| Loads a TDib with resource id resId from module. | |
| virtual TCelArray * | GetCelArray () |
| void | RegisterItem (TDrawItem *item) |
| For automatic deletion of items. | |
| TDrawItemArray & | GetItems () |
| Returns ItemArray. | |
Protected Member Functions | |
| int | GetIndex (int cmdId) |
| Returns the array index of the item with id cmdId. | |
| virtual TDrawItem * | CreateItem (uint itemId, const tstring &text) |
| Returns the item with id cmdId if it exists; otherwise creates a new item and returns it. | |
Static Protected Member Functions | |
| static TFont * | CreateProxyMenuFont () |
| Creates a font for use in menu bars. | |
Protected Attributes | |
| TUIntAray * | Array |
| Array of id's. | |
Derived from TDrawItemProxy, TDrawMenuItemProxy is a proxy parent for TDrawMenuItem.
Definition at line 229 of file drawitem.h.
Container of TDrawItem's.
Definition at line 232 of file drawitem.h.
| owl::TDrawMenuItemProxy::TDrawMenuItemProxy | ( | TResId | resId, |
| TModule * | module = &GetGlobalModule() ) |
Constructs a TDrawMenuItemProxy object using the specified resource.
Definition at line 1345 of file drawitem.cpp.
References owl::TCelArray::TCelArray(), owl::TDrawItemProxy::TDrawItemProxy(), owl::TTypedArray< T, R, A >::Add(), Array, CreateProxyMenuFont(), owl::TToolbarRes::GetBitmap(), owl::TToolbarRes::GetCount(), owl::TToolbarRes::GetHeight(), owl::TToolbarRes::GetIds(), owl::TToolbarRes::GetWidth(), owl::TBitmap::Height(), owl::TColor::LtGray, owl::NoAutoDelete, and owl::TDrawItemProxy::SetCelArray().
|
virtual |
|
protectedvirtual |
Returns the item with id cmdId if it exists; otherwise creates a new item and returns it.
Definition at line 1381 of file drawitem.cpp.
References owl::TDrawMenuItem::TDrawMenuItem(), owl::TButtonTextDrawItem::GetIndex(), GetIndex(), owl::TDrawItemProxy::GetItems(), owl::TButtonTextDrawItem::GetText(), owl::TDrawItemProxy::RegisterItem(), owl::TButtonTextDrawItem::sepNoBitmap, owl::TArrayBase::Size(), and TYPESAFE_DOWNCAST.
|
staticprotected |
Creates a font for use in menu bars.
Definition at line 1335 of file drawitem.cpp.
References owl::TFont::TFont().
Returns true if a shortcut was pressed that fits into the menu and false if not.
Definition at line 1449 of file drawitem.cpp.
References _T, _tcschr, _totupper, owl::TButtonTextDrawItem::GetText(), owl::MkUint32(), PRECONDITION, and TYPESAFE_DOWNCAST.
Returns the TDrawItem with id cmdId, or 0 if it doesn't exist.
Definition at line 1489 of file drawitem.cpp.
References GetIndex(), owl::TDrawItemProxy::GetItems(), owl::TArrayBase::NPOS, and owl::TArrayBase::Size().
|
protected |
Returns the array index of the item with id cmdId.
Definition at line 1508 of file drawitem.cpp.
References Array, and owl::TTypedArray< T, R, A >::Find().
| void owl::TDrawMenuItemProxy::RemapMenu | ( | HMENU | hMenu | ) |
Walks through the menu tree hMenu adding seperators.
Definition at line 1405 of file drawitem.cpp.
References CreateItem(), MAX_PATH, RemapMenu(), and owl::TButtonTextDrawItem::sepNoBitmap.
|
protected |
Array of id's.
Definition at line 249 of file drawitem.h.