CBDDItemInfo Class Reference

#include <bitmapdropdown.h>

List of all members.

Public Member Functions

 CBDDItemInfo ()
 CBDDItemInfo (UINT32 uiBitmapResID, String_256 strText)
UINT32 GetBitmapID ()
BOOL HasText ()
String_256 GetText ()
const CBDDItemInfooperator= (const CBDDItemInfo &rOther)

Protected Attributes

UINT32 m_uiBitmapResID
BOOL m_bHasText
String_256 m_strText


Detailed Description

Class : CBDDItemInfo Base Class : none Author : Mikhail Tatarnikov Description : Item information for Bitmap Dropdown control. Pure Virtual : No Known Issues : None Usage Notes : We need two separate fields for text, since the base DropDown class identifies items by their text. So, if all items have no string, they are considered the same, and as result some operations (like SetSelection) work incorrectly. Override Notes: None

Definition at line 154 of file bitmapdropdown.h.


Constructor & Destructor Documentation

CBDDItemInfo::CBDDItemInfo  ) 
 

Definition at line 128 of file bitmapdropdown.cpp.

00129 {
00130     m_uiBitmapResID = (UINT32)-1;
00131 }

CBDDItemInfo::CBDDItemInfo UINT32  uiBitmapResID,
String_256  strText
 

Definition at line 134 of file bitmapdropdown.cpp.

00135 {
00136     m_uiBitmapResID = uiBitmapResID;
00137     m_bHasText      = strText.IsEmpty();
00138     
00139     if (m_bHasText)
00140         m_strText = strText;
00141     else
00142     {
00143         // Workaround the DropDown feature - it distinguish the items by
00144         // their names (so we can't select items with empty text.
00145         static UINT32 s_iDummy = 0;
00146         m_strText._MakeMsg(_T("%d"), ++s_iDummy);
00147     }
00148 }


Member Function Documentation

UINT32 CBDDItemInfo::GetBitmapID  ) 
 

Definition at line 159 of file bitmapdropdown.cpp.

00160 {
00161     return m_uiBitmapResID;
00162 }

String_256 CBDDItemInfo::GetText  ) 
 

Definition at line 164 of file bitmapdropdown.cpp.

00165 {
00166     return m_strText;
00167 }

BOOL CBDDItemInfo::HasText  ) 
 

Definition at line 169 of file bitmapdropdown.cpp.

00170 {
00171     return m_bHasText;
00172 }

const CBDDItemInfo & CBDDItemInfo::operator= const CBDDItemInfo rOther  ) 
 

Definition at line 150 of file bitmapdropdown.cpp.

00151 {
00152     m_uiBitmapResID = rOther.m_uiBitmapResID;
00153     m_bHasText      = rOther.m_bHasText;
00154     m_strText       = rOther.m_strText;
00155 
00156     return *this;
00157 }


Member Data Documentation

BOOL CBDDItemInfo::m_bHasText [protected]
 

Definition at line 169 of file bitmapdropdown.h.

String_256 CBDDItemInfo::m_strText [protected]
 

Definition at line 170 of file bitmapdropdown.h.

UINT32 CBDDItemInfo::m_uiBitmapResID [protected]
 

Definition at line 168 of file bitmapdropdown.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:51:52 2007 for Camelot by  doxygen 1.4.4