NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CGroupMapWidget::CGroupItem Class Reference

Search Toolkit Book for CGroupMapWidget::CGroupItem

CGroupItem ////////////////////////////////////////////////////////////. More...

#include <gui/widgets/wx/group_map_widget.hpp>

+ Inheritance diagram for CGroupMapWidget::CGroupItem:
+ Collaboration diagram for CGroupMapWidget::CGroupItem:

Public Types

enum  EDefaultState { eDefaultHide, eDefaultYes, eDefaultNo }
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1, eAllocFillZero, eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef CAtomicCounter TCounter
 Counter type is CAtomiCounter. More...
 
typedef TCounter::TValue TCount
 Alias for value type of counter. More...
 

Public Member Functions

 CGroupItem (const string &label, wxBitmap &icon, const string &descr, EDefaultState def, CGroupMapWidget &widget, bool group)
 CGroupItem. More...
 
bool IsExpanded () const
 
void Expand (bool exp)
 
EDefaultState GetDefaultState () const
 
void SetDefaultState (EDefaultState state)
 
string GetFullDescr () const
 
IMapItem implementation
virtual void Layout (wxDC &dc, SwxMapItemProperties &props)
 
virtual int PreferredHeight (wxDC &dc, SwxMapItemProperties &props, int width)
 
virtual void Draw (wxDC &dc, int state, SwxMapItemProperties &props)
 Draws item in the given rectangle, state is a combination of EItemState flags. More...
 
virtual void OnDefaultAction ()
 a callback to perform a default action associated with the item More...
 
virtual bool OnHotTrack (const wxPoint &ms_pos)
 
virtual void OnMouseDown (const wxPoint &ms_pos)
 
virtual void OnLeftDoubleClick (const wxPoint &ms_pos)
 
- Public Member Functions inherited from CMapItem
 CMapItem ()
 CMapItem. More...
 
 CMapItem (const string &label, wxBitmap &icon, const string &descr, bool separator=false)
 
virtual ~CMapItem ()
 
const stringGetLabel () const
 
const stringGetDescr () const
 
void SetIcon (wxBitmap &image)
 
virtual void SetCommand (TCmdID cmd, wxEvtHandler *target)
 enables sending commands on default action; set target to NULL to disable More...
 
virtual void SetRect (const wxRect &rc)
 
virtual void GetRect (wxRect &rc) const
 
virtual bool IsGroupSeparator () const
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 
- Public Member Functions inherited from IwxMapItem
virtual ~IwxMapItem ()
 

Protected Member Functions

virtual int x_GetItemShift () const
 
virtual int x_PreferredSeparatorHeight (wxDC &dc) const
 
virtual void x_DrawBackground (wxDC &dc, const wxRect &rc, int state, SwxMapItemProperties &props)
 
- Protected Member Functions inherited from CMapItem
void x_Init ()
 
virtual int x_GetTextAreaWidth (SwxMapItemProperties &props, int width) const
 
virtual void x_UpdatePreferredHeights (wxDC &dc, SwxMapItemProperties &props, int width)
 
virtual int x_PreferredLabelHeight (wxDC &dc, SwxMapItemProperties &props, int text_w) const
 
virtual int x_CalculateRealTextWidth (wxDC &dc, SwxMapItemProperties &props)
 
virtual void x_DrawFocusRect (wxDC &dc, const wxRect &rc, int state, SwxMapItemProperties &props)
 
virtual void x_DrawSeparator (wxDC &dc, const wxRect &rc, SwxMapItemProperties &props)
 
virtual void x_DrawText (wxDC &dc, const string &text, const wxRect &rc, bool selected, bool focused, bool highlighted, SwxMapItemProperties &props)
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Protected Attributes

CGroupMapWidgetm_Widget
 
bool m_Expanded
 
bool m_HotLabel
 
int m_LabelRealW
 
bool m_HotDef
 
int m_DefWidth
 
EDefaultState m_DefaultState
 
bool m_ClickOnSpace
 
- Protected Attributes inherited from CMapItem
string m_Label
 
wxBitmap m_Icon
 
string m_Descr
 
bool m_Separator
 
TCmdID m_Cmd
 
wxEvtHandler * m_CmdTarget
 
bool m_PrefsDirty
 
int m_LabelPrefH
 
wxRect m_Rect
 
wxPoint m_IconPos
 
wxRect m_LabelRect
 

Additional Inherited Members

- Static Public Member Functions inherited from CObject
static NCBI_NORETURN void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_NORETURN void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 
- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 

Detailed Description

CGroupItem ////////////////////////////////////////////////////////////.

Definition at line 109 of file group_map_widget.hpp.

Member Enumeration Documentation

Enumerator
eDefaultHide 
eDefaultYes 
eDefaultNo 

Definition at line 112 of file group_map_widget.hpp.

Constructor & Destructor Documentation

CGroupMapWidget::CGroupItem::CGroupItem ( const string label,
wxBitmap &  icon,
const string descr,
EDefaultState  def,
CGroupMapWidget widget,
bool  group 
)

CGroupItem.

Definition at line 359 of file group_map_widget.cpp.

Member Function Documentation

void CGroupMapWidget::CGroupItem::Draw ( wxDC &  dc,
int  state,
SwxMapItemProperties props 
)
virtual

Draws item in the given rectangle, state is a combination of EItemState flags.

Reimplemented from CMapItem.

Definition at line 467 of file group_map_widget.cpp.

References CSelectionControl::fItemSelected, CSelectionControl::fWidgetFocused, kSetDefault, kUnsetDefault, SwxMapItemProperties::m_Border, and SwxMapItemProperties::m_Font.

void CGroupMapWidget::CGroupItem::Expand ( bool  exp)

Definition at line 384 of file group_map_widget.cpp.

Referenced by CGroupMapWidget::x_OnToggleGroup().

EDefaultState CGroupMapWidget::CGroupItem::GetDefaultState ( ) const
inline

Definition at line 136 of file group_map_widget.hpp.

References m_DefaultState.

Referenced by CGroupMapWidget::x_OnMakeDefaultItem().

string CGroupMapWidget::CGroupItem::GetFullDescr ( ) const

Definition at line 389 of file group_map_widget.cpp.

References GetLabel().

Referenced by CItemSelectionPanel::OnItemSelected().

bool CGroupMapWidget::CGroupItem::IsExpanded ( ) const

Definition at line 378 of file group_map_widget.cpp.

Referenced by CGroupMapWidget::x_OnToggleGroup().

void CGroupMapWidget::CGroupItem::Layout ( wxDC &  dc,
SwxMapItemProperties props 
)
virtual
void CGroupMapWidget::CGroupItem::OnDefaultAction ( )
virtual

a callback to perform a default action associated with the item

Reimplemented from CMapItem.

Definition at line 543 of file group_map_widget.cpp.

bool CGroupMapWidget::CGroupItem::OnHotTrack ( const wxPoint &  ms_pos)
virtual

Reimplemented from CMapItem.

Definition at line 553 of file group_map_widget.cpp.

void CGroupMapWidget::CGroupItem::OnLeftDoubleClick ( const wxPoint &  ms_pos)
virtual

Reimplemented from CMapItem.

Definition at line 587 of file group_map_widget.cpp.

void CGroupMapWidget::CGroupItem::OnMouseDown ( const wxPoint &  ms_pos)
virtual

Reimplemented from CMapItem.

Definition at line 575 of file group_map_widget.cpp.

int CGroupMapWidget::CGroupItem::PreferredHeight ( wxDC &  dc,
SwxMapItemProperties props,
int  width 
)
virtual

Reimplemented from CMapItem.

Definition at line 415 of file group_map_widget.cpp.

References SwxMapItemProperties::m_VertMargin, and max().

void CGroupMapWidget::CGroupItem::SetDefaultState ( EDefaultState  state)
inline

Definition at line 137 of file group_map_widget.hpp.

References m_DefaultState.

Referenced by CGroupMapWidget::x_OnMakeDefaultItem().

void CGroupMapWidget::CGroupItem::x_DrawBackground ( wxDC &  dc,
const wxRect &  rc,
int  state,
SwxMapItemProperties props 
)
protectedvirtual
int CGroupMapWidget::CGroupItem::x_GetItemShift ( ) const
protectedvirtual

Reimplemented from CMapItem.

Definition at line 439 of file group_map_widget.cpp.

int CGroupMapWidget::CGroupItem::x_PreferredSeparatorHeight ( wxDC &  dc) const
protectedvirtual

Reimplemented from CMapItem.

Definition at line 515 of file group_map_widget.cpp.

Member Data Documentation

bool CGroupMapWidget::CGroupItem::m_ClickOnSpace
protected

Definition at line 155 of file group_map_widget.hpp.

EDefaultState CGroupMapWidget::CGroupItem::m_DefaultState
protected

Definition at line 154 of file group_map_widget.hpp.

Referenced by GetDefaultState(), and SetDefaultState().

int CGroupMapWidget::CGroupItem::m_DefWidth
protected

Definition at line 153 of file group_map_widget.hpp.

bool CGroupMapWidget::CGroupItem::m_Expanded
protected

Definition at line 149 of file group_map_widget.hpp.

bool CGroupMapWidget::CGroupItem::m_HotDef
protected

Definition at line 152 of file group_map_widget.hpp.

bool CGroupMapWidget::CGroupItem::m_HotLabel
protected

Definition at line 150 of file group_map_widget.hpp.

int CGroupMapWidget::CGroupItem::m_LabelRealW
protected

Definition at line 151 of file group_map_widget.hpp.

CGroupMapWidget& CGroupMapWidget::CGroupItem::m_Widget
protected

Definition at line 148 of file group_map_widget.hpp.


The documentation for this class was generated from the following files:
Modified on Mon May 29 16:56:02 2017 by modify_doxy.py rev. 533848