NCBI C++ ToolKit
|
Search Toolkit Book for CMinPanelContainer
#include <gui/widgets/wx/min_panel_container.hpp>
Classes | |
struct | SItem |
Public Types | |
typedef wxPanel | TParent |
Public Member Functions | |
CMinPanelContainer (wxWindow *parent, CDockManager &manager) | |
virtual | ~CMinPanelContainer () |
void | AddClient (CDockPanel &panel) |
void | RemoveClient (CDockPanel &panel) |
bool | HasClient (CDockPanel &panel) const |
virtual bool | Layout () |
virtual wxSize | DoGetBestSize () const |
void | OnPaint (wxPaintEvent &event) |
void | OnSize (wxSizeEvent &event) |
void | OnContextMenu (wxContextMenuEvent &event) |
void | OnLeftClick (wxMouseEvent &event) |
void | OnDockPanelCommand (wxCommandEvent &event) |
void | OnRestoreWindow (wxCommandEvent &event) |
void | OnShowWindowsDlg (wxCommandEvent &event) |
void | OnUpdateWindowCommand (wxUpdateUIEvent &event) |
Protected Types | |
typedef vector< SItem * > | TItems |
Protected Member Functions | |
const SItem * | x_FindItemByPanel (CDockPanel *panel) const |
SItem * | x_FindItemByPos (const wxPoint &pt) |
wxSize | x_MeasureItem (wxDC &dc, const SItem &descr) |
void | x_DrawItem (wxDC &dc, SItem &descr) |
Protected Attributes | |
CDockManager & | m_DockManager |
TItems | m_Items |
wxSize | m_PrefSize |
wxFont | m_Font |
CDockPanel * | m_MenuPanel |
map< int, CDockPanel * > | m_CmdToPanel |
panel for which context menu is shown More... | |
Private Member Functions | |
DECLARE_EVENT_TABLE () | |
Definition at line 50 of file min_panel_container.hpp.
|
protected |
Definition at line 85 of file min_panel_container.hpp.
typedef wxPanel CMinPanelContainer::TParent |
Definition at line 55 of file min_panel_container.hpp.
CMinPanelContainer::CMinPanelContainer | ( | wxWindow * | parent, |
CDockManager & | manager | ||
) |
|
virtual |
Definition at line 88 of file min_panel_container.cpp.
void CMinPanelContainer::AddClient | ( | CDockPanel & | panel | ) |
Definition at line 93 of file min_panel_container.cpp.
References Layout(), CMinPanelContainer::SItem::m_DockPanel, m_Items, and m_MenuPanel.
Referenced by CDockManager::Minimize().
|
private |
|
virtual |
Definition at line 266 of file min_panel_container.cpp.
References m_PrefSize.
bool CMinPanelContainer::HasClient | ( | CDockPanel & | panel | ) | const |
Definition at line 142 of file min_panel_container.cpp.
References NULL, and x_FindItemByPanel().
Referenced by CDockManager::IsMinimized(), CDockManager::MoveToMainTab(), CDockManager::Remove(), and CDockManager::x_MoveToFloatingFrame().
|
virtual |
Definition at line 190 of file min_panel_container.cpp.
References bounds, i, kMinH, kOffsetX, kOffsetY, m_Font, m_Items, m_PrefSize, CMinPanelContainer::SItem::m_Rect, max(), ncbi::grid::netcache::search::fields::size, and x_MeasureItem().
Referenced by AddClient(), OnSize(), and RemoveClient().
void CMinPanelContainer::OnContextMenu | ( | wxContextMenuEvent & | event | ) |
Definition at line 350 of file min_panel_container.cpp.
References CUICommandRegistry::AppendMenuItem(), map_checker< Container >::clear(), client, cmd, eCmdShowWindowsDlg, CDockPanel::GetClient(), CDockManager::GetDockPanelMenu(), CUICommandRegistry::GetInstance(), kRestoreWindowFirst, label, m_CmdToPanel, m_DockManager, CMinPanelContainer::SItem::m_DockPanel, m_Items, m_MenuPanel, NON_CONST_ITERATE, NULL, ToWxString(), and x_FindItemByPos().
void CMinPanelContainer::OnDockPanelCommand | ( | wxCommandEvent & | event | ) |
Definition at line 402 of file min_panel_container.cpp.
References _ASSERT, m_DockManager, m_MenuPanel, NULL, and CDockManager::OnDockPanelCommand().
void CMinPanelContainer::OnLeftClick | ( | wxMouseEvent & | event | ) |
Definition at line 338 of file min_panel_container.cpp.
References eCmdWindowRestore, m_DockManager, CMinPanelContainer::SItem::m_DockPanel, CDockManager::OnDockPanelCommand(), and x_FindItemByPos().
void CMinPanelContainer::OnPaint | ( | wxPaintEvent & | event | ) |
Definition at line 272 of file min_panel_container.cpp.
References i, m_Items, and x_DrawItem().
void CMinPanelContainer::OnRestoreWindow | ( | wxCommandEvent & | event | ) |
Definition at line 411 of file min_panel_container.cpp.
References _ASSERT, cmd, eCmdWindowRestore, map_checker< Container >::end(), map_checker< Container >::find(), m_CmdToPanel, m_DockManager, CMinPanelContainer::SItem::m_DockPanel, m_Items, NON_CONST_ITERATE, and CDockManager::OnDockPanelCommand().
void CMinPanelContainer::OnShowWindowsDlg | ( | wxCommandEvent & | event | ) |
Definition at line 439 of file min_panel_container.cpp.
References CDockManager::GetWindowManager(), m_DockManager, and CWindowManager::OnShowWindowsDlg().
void CMinPanelContainer::OnSize | ( | wxSizeEvent & | event | ) |
Definition at line 149 of file min_panel_container.cpp.
References Layout().
void CMinPanelContainer::OnUpdateWindowCommand | ( | wxUpdateUIEvent & | event | ) |
Definition at line 430 of file min_panel_container.cpp.
References client, CDockPanel::GetClient(), CDockManager::GetWindowManager(), m_DockManager, m_MenuPanel, NULL, and CWindowManager::OnUpdateWindowCommand_Client().
void CMinPanelContainer::RemoveClient | ( | CDockPanel & | panel | ) |
Definition at line 112 of file min_panel_container.cpp.
References _ASSERT, Layout(), CMinPanelContainer::SItem::m_DockPanel, m_Items, m_MenuPanel, NON_CONST_ITERATE, and NULL.
Referenced by CDockManager::MoveToMainTab(), CDockManager::Remove(), CDockManager::Restore(), and CDockManager::x_MoveToFloatingFrame().
|
protected |
Definition at line 293 of file min_panel_container.cpp.
References bmp, client, CDockPanel::GetClient(), kIconOffX, kLabelOffsetX, label, CMinPanelContainer::SItem::m_DockPanel, m_Font, CMinPanelContainer::SItem::m_Rect, ToWxString(), and TruncateText().
Referenced by OnPaint().
|
protected |
Definition at line 157 of file min_panel_container.cpp.
References ITERATE, CMinPanelContainer::SItem::m_DockPanel, m_Items, and NULL.
Referenced by HasClient().
|
protected |
Definition at line 168 of file min_panel_container.cpp.
References m_Items, CMinPanelContainer::SItem::m_Rect, NON_CONST_ITERATE, and NULL.
Referenced by OnContextMenu(), and OnLeftClick().
Definition at line 235 of file min_panel_container.cpp.
References bmp, client, CDockPanel::GetClient(), kIconOffX, kIconOffY, kLabelOffsetX, kLabelOffsetY, kMaxW, kMinH, kMinW, label, CMinPanelContainer::SItem::m_DockPanel, max(), min(), ncbi::grid::netcache::search::fields::size, and ToWxString().
Referenced by Layout().
|
protected |
panel for which context menu is shown
maps automatically generated cmd ids to Dock Panels
Definition at line 103 of file min_panel_container.hpp.
Referenced by OnContextMenu(), and OnRestoreWindow().
|
protected |
Definition at line 94 of file min_panel_container.hpp.
Referenced by OnContextMenu(), OnDockPanelCommand(), OnLeftClick(), OnRestoreWindow(), OnShowWindowsDlg(), and OnUpdateWindowCommand().
|
protected |
Definition at line 98 of file min_panel_container.hpp.
Referenced by Layout(), and x_DrawItem().
|
protected |
Definition at line 96 of file min_panel_container.hpp.
Referenced by AddClient(), Layout(), OnContextMenu(), OnPaint(), OnRestoreWindow(), RemoveClient(), x_FindItemByPanel(), and x_FindItemByPos().
|
protected |
Definition at line 100 of file min_panel_container.hpp.
Referenced by AddClient(), OnContextMenu(), OnDockPanelCommand(), OnUpdateWindowCommand(), and RemoveClient().
|
protected |
Definition at line 97 of file min_panel_container.hpp.
Referenced by DoGetBestSize(), and Layout().