NCBI C++ ToolKit
|
Search Toolkit Book for COpenObjectsPanel
#include <gui/widgets/loaders/open_objects_panel.hpp>
Classes | |
class | CPage |
Public Member Functions | |
COpenObjectsPanel () | |
COpenObjectsPanel (wxWindow *parent, wxWindowID id=ID_SPLITTER_PANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxFULL_REPAINT_ON_RESIZE) | |
bool | Create (wxWindow *parent, wxWindowID id=ID_SPLITTER_PANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxFULL_REPAINT_ON_RESIZE) |
~COpenObjectsPanel () | |
void | Init () |
void | CreateControls () |
IWizardPage * | GetWizardPage () |
void | OnLoaderSelected (wxCommandEvent &event) |
void | SetManagers (vector< CIRef< IOpenObjectsPanelClient > > &managers) |
IObjectLoader * | GetObjectLoader () |
IRegSettings interface | |
virtual void | SetRegistryPath (const string &path) |
virtual void | LoadSettings () |
virtual void | SaveSettings () const |
Public Member Functions inherited from CSplitter | |
CSplitter () | |
CSplitter (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("panel")) | |
CSplitter (wxWindow *parent, wxWindowID id=wxID_ANY, ESplitType type=eVertical) | |
virtual | ~CSplitter () |
ESplitType | GetSplitType () const |
int | GetSeparatorSize () const |
virtual void | Split (ESplitType type) |
Creates a splitter with a single cell. More... | |
virtual void | Split (ESplitType type, const TPosVector &sizes) |
Creates a splitter with cells defined by "sizes". More... | |
virtual void | Split (ESplitType type, const int ar_size[]) |
Creates a splitter with cells defined by "sizes". More... | |
virtual void | Split (ESplitType type, const TPosVector &widths, const TPosVector &heights) |
Creates splitter, "widths" and "height" define number and sizes of cells. More... | |
virtual void | Split (ESplitType type, const int ar_w[], const int ar_h[]) |
Creates splitter, "ar_w" and "ar_h" are arrays terminated by -1. More... | |
virtual void | Split (int col_n, int row_n) |
int | GetColumnsCount () const |
int | GetRowsCount () const |
void | GetWidths (TPosVector &widths) const |
void | SetWidths (const TPosVector &widths) |
void | GetHeights (TPosVector &heights) const |
void | SetHeights (const TPosVector &heights) |
void | SetResizableCell (int col, int row) |
virtual bool | Layout () |
virtual bool | Show (bool show=true) |
virtual void | BlockLayout (bool block=true) |
bool | IsValidCell (int col, int row) const |
returns "true" if cell specified by (col, row) exists in the splitter More... | |
int | GetColumnWidth (int col) const |
int | GetRowHeight (int row) const |
bool | InsertToCell (wxWindow *child, int col, int row) |
If cell [col, row] exists and vacant - adds widget to the container. More... | |
void | AddColumn () |
void | AddRow () |
virtual void | RemoveChild (wxWindowBase *child) |
overriding wxWindowBase function More... | |
virtual bool | RemoveFromCell (int col, int row) |
virtual void | RemoveAll () |
wxWindow * | GetCell (int col, int row) |
const wxWindow * | GetCell (int col, int row) const |
bool | FindChild (const wxWindow *child, int &col, int &row) const |
virtual void | x_PreserveNormalSize (bool preserve) |
Public Member Functions inherited from IRegSettings | |
virtual | ~IRegSettings () |
Protected Types | |
enum | { ID_SPLITTER_PANEL = 10003 , ID_LOADER_LIST , ID_OPTION_PANEL } |
Protected Types inherited from CSplitter | |
typedef vector< wxWindow * > | TCells |
Protected Member Functions | |
bool | x_CanLeavePage (bool forward) |
wxPanel * | x_GetPanel () |
IWizardPage * | x_GetNextPage () |
IWizardPage * | x_GetOptionsPage () |
void | x_AppendOptionForManager (IOpenObjectsPanelClient &manager) |
add a Loading Option (displayed in the list on the left) for the given Manager More... | |
void | x_SelectManager (int index) |
Protected Member Functions inherited from CSplitter | |
virtual void | x_DrawSeparator (wxDC &dc, int x, int y, int w, int h) |
void | x_SplitPositionsToSizes (const TPosVector &split_positions, int total_size, TPosVector &sizes) const |
void | x_SizesToSplitPositions (const TPosVector &sizes, TPosVector &split_positions) |
void | x_Init () |
void | x_Split (ESplitType type, const TPosVector &widths, const TPosVector &heights) |
int | x_GetCellIndex (int i_x, int i_y) const |
int | x_GetColumn (int i_cell) const |
int | x_GetRow (int i_cell) const |
int | x_GetCellIndex (wxWindow *widget) const |
int | x_GetLeft (int i_x) const |
int | x_GetRight (int i_x) const |
int | x_GetWidth (int i_x) const |
int | x_GetTop (int i_y) const |
int | x_GetBottom (int i_y) const |
int | x_GetHeight (int i_y) const |
bool | x_RemoveChild (int index) |
void | x_Clear () |
void | x_ResizeToCell (int i_cell) |
void | x_ResizeToCell (int i_x, int i_y) |
void | x_ResizeAllCells () |
void | OnPaint (wxPaintEvent &event) |
void | OnMouseMove (wxMouseEvent &event) |
void | OnLeftDown (wxMouseEvent &event) |
void | OnLeftUp (wxMouseEvent &event) |
void | OnMouseEnter (wxMouseEvent &event) |
void | OnMouseLeave (wxMouseEvent &event) |
void | OnContextMenu (wxContextMenuEvent &event) |
void | OnKeyDown (wxKeyEvent &event) |
void | x_RequestUpdate () |
int | x_HitTestSeparator (int z, TPosVector &vpos) |
returns Separator index if hit or -1 More... | |
void | x_HitTest (int z, TPosVector &vpos, int &i_cell, int &i_sep) |
virtual void | x_StartDrag (int i_sep_x, int i_sep_y) |
virtual void | x_DoDragSeparator (wxMouseEvent &event, bool b_final) |
virtual void | x_EndDrag () |
virtual bool | x_IsDragging () const |
void | x_DistributeEvenly (bool b_x, bool b_y) |
void | x_DoDistributeEvenly (TPosVector &vSplitPos, int size) |
virtual void | x_Resize (const wxSize &old_size, const wxSize &new_size, bool b_size_changes) |
void | x_DoResize (TPosVector &sizes, TSizeVector &norm_sizes, TPosVector &min_sizes, int size, int new_size, int resizable_index) |
void | x_MoveSeparator (TPosVector &sizes, TSizeVector &norm_sizes, TPosVector &min_sizes, int i_sep, int delta, int resizable_index) |
void | x_GetMinimized (vector< bool > &min_cols, vector< bool > &min_rows) const |
void | x_CalculateMinSizes (TPosVector &min_widths, TPosVector &min_heights) const |
void | x_UpdateRegion (int start_x, int stop_x, int start_y, int stop_y) |
void | x_NewSplit (TPosVector &split_positions, TSizeVector &v_norm_size, int size) |
void | x_Deprecated () const |
Protected Attributes | |
string | m_RegPath |
wxSimpleHtmlListBox * | m_LoadersListBox |
wxPanel * | m_OptionPanel |
int | m_CurrManager |
vector< CIRef< IOpenObjectsPanelClient > > | m_Managers |
Load Managers corresponding to Loading Options. More... | |
CPage | m_WizardPage |
Protected Attributes inherited from CSplitter | |
ESplitType | m_Type |
bool | m_BlockLayout |
wxSize | m_LayoutedSize |
wxSize | m_SplitSize |
TPosVector | m_vSplitPosX |
TPosVector | m_vSplitPosY |
int | m_SepSize |
TSizeVector | m_vNormSizeX |
TSizeVector | m_vNormSizeY |
TCells | m_Cells |
int | m_ResizableColumn |
int | m_ResizableRow |
wxWindow * | m_PrevFocus |
members used for event handling More... | |
int | m_MouseDownX |
int | m_MouseDownY |
int | m_StartPosX |
int | m_StartPosY |
int | m_iDragSepX |
int | m_iDragSepY |
wxPoint | m_PrevSepPos |
TPosVector | m_MinWidths |
TPosVector | m_MinHeights |
int | m_MinSepPosX |
int | m_MaxSepPosX |
int | m_MinSepPosY |
int | m_MaxSepPosY |
int | m_HighlightCell |
Additional Inherited Members | |
Public Types inherited from CSplitter | |
enum | ESplitType { eVertical , eHorizontal , eGrid } |
ESplitMode - splitter orientation. More... | |
typedef wxPanel | TParent |
typedef vector< int > | TPosVector |
typedef vector< int > | TSizeVector |
Static Protected Member Functions inherited from CSplitter | |
static void | x_ShrinkCell (TPosVector &sizes, TPosVector &min_sizes, TPosVector &norm_sizes, int index, int &delta) |
static void | x_GrowCell (TPosVector &sizes, TPosVector &norm_sizes, int index, int &delta, bool unlimited=false) |
Definition at line 58 of file open_objects_panel.hpp.
|
protected |
Enumerator | |
---|---|
ID_SPLITTER_PANEL | |
ID_LOADER_LIST | |
ID_OPTION_PANEL |
Definition at line 118 of file open_objects_panel.hpp.
COpenObjectsPanel::COpenObjectsPanel | ( | ) |
Definition at line 56 of file open_objects_panel.cpp.
References Init().
COpenObjectsPanel::COpenObjectsPanel | ( | wxWindow * | parent, |
wxWindowID | id = ID_SPLITTER_PANEL , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxSize(400, 300) , |
||
long | style = wxFULL_REPAINT_ON_RESIZE |
||
) |
Definition at line 63 of file open_objects_panel.cpp.
References Init(), and ncbi::grid::netcache::search::fields::size.
COpenObjectsPanel::~COpenObjectsPanel | ( | ) |
Definition at line 90 of file open_objects_panel.cpp.
bool COpenObjectsPanel::Create | ( | wxWindow * | parent, |
wxWindowID | id = ID_SPLITTER_PANEL , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxSize(400, 300) , |
||
long | style = wxFULL_REPAINT_ON_RESIZE |
||
) |
Definition at line 72 of file open_objects_panel.cpp.
References CreateControls(), CSplitter::eHorizontal, ncbi::grid::netcache::search::fields::size, and CSplitter::Split().
void COpenObjectsPanel::CreateControls | ( | ) |
Definition at line 101 of file open_objects_panel.cpp.
References ID_LOADER_LIST, CSplitter::InsertToCell(), and m_LoadersListBox.
Referenced by Create().
IObjectLoader * COpenObjectsPanel::GetObjectLoader | ( | ) |
Definition at line 138 of file open_objects_panel.cpp.
References m_CurrManager, and m_Managers.
Referenced by COpenObjectsDlg::GetObjectLoader().
|
inline |
Definition at line 76 of file open_objects_panel.hpp.
References m_WizardPage.
Referenced by COpenObjectsDlg::SetManagers().
void COpenObjectsPanel::Init | ( | void | ) |
Definition at line 94 of file open_objects_panel.cpp.
References m_CurrManager, m_LoadersListBox, m_OptionPanel, and NULL.
|
virtual |
Implements IRegSettings.
Definition at line 267 of file open_objects_panel.cpp.
References CGuiRegistry::GetInstance(), CRegistryReadView::GetIntVec(), IOpenObjectsPanelClient::GetLabel(), CGuiRegistry::GetReadView(), CRegistryReadView::GetString(), i, int, kSelOptionTag, kSplitterWidthsTag, IRegSettings::LoadSettings(), m_CurrManager, m_Managers, m_RegPath, max(), IRegSettings::SetRegistryPath(), CSplitter::SetWidths(), and x_SelectManager().
Referenced by COpenObjectsDlg::x_LoadSettings().
void COpenObjectsPanel::OnLoaderSelected | ( | wxCommandEvent & | event | ) |
Definition at line 214 of file open_objects_panel.cpp.
References m_LoadersListBox, and x_SelectManager().
|
virtual |
Implements IRegSettings.
Definition at line 311 of file open_objects_panel.cpp.
References CGuiRegistry::GetInstance(), IOpenObjectsPanelClient::GetLabel(), CSplitter::GetWidths(), CGuiRegistry::GetWriteView(), i, kSelOptionTag, kSplitterWidthsTag, m_CurrManager, m_Managers, m_RegPath, IRegSettings::SaveSettings(), CRegistryWriteView::Set(), and IRegSettings::SetRegistryPath().
Referenced by COpenObjectsDlg::x_SaveSettings().
void COpenObjectsPanel::SetManagers | ( | vector< CIRef< IOpenObjectsPanelClient > > & | managers | ) |
Definition at line 108 of file open_objects_panel.cpp.
References _ASSERT, i, ID_OPTION_PANEL, CSplitter::InsertToCell(), m_Managers, m_OptionPanel, m_WizardPage, IToolWizard::SetParentWindow(), IToolWizard::SetPrevPage(), and x_AppendOptionForManager().
Referenced by COpenObjectsDlg::SetManagers().
Implements IRegSettings.
Definition at line 259 of file open_objects_panel.cpp.
References m_RegPath.
Referenced by COpenObjectsDlg::x_LoadSettings(), and COpenObjectsDlg::x_SaveSettings().
|
protected |
add a Loading Option (displayed in the list on the left) for the given Manager
Definition at line 191 of file open_objects_panel.cpp.
References IOpenObjectsPanelClient::GetLabel(), m_LoadersListBox, and ToWxString().
Referenced by SetManagers().
Definition at line 147 of file open_objects_panel.cpp.
References IWizardPage::CanLeavePage(), IToolWizard::GetFirstPage(), m_CurrManager, m_Managers, and wxT.
Referenced by COpenObjectsPanel::CPage::CanLeavePage().
|
protected |
Definition at line 172 of file open_objects_panel.cpp.
References IToolWizard::GetFirstPage(), IWizardPage::GetNextPage(), m_CurrManager, and m_Managers.
Referenced by COpenObjectsPanel::CPage::GetNextPage().
|
protected |
Definition at line 181 of file open_objects_panel.cpp.
References IToolWizard::GetFirstPage(), IWizardPage::GetOptionsPage(), m_CurrManager, and m_Managers.
Referenced by COpenObjectsPanel::CPage::GetOptionsPage().
|
protected |
Definition at line 164 of file open_objects_panel.cpp.
References m_Managers, and m_OptionPanel.
Referenced by COpenObjectsPanel::CPage::GetPanel().
|
protected |
Definition at line 219 of file open_objects_panel.cpp.
References CWizardDlg::eCmdUpdateButtons, IToolWizard::GetFirstPage(), IWizardPage::GetPanel(), m_CurrManager, m_LoadersListBox, m_Managers, m_OptionPanel, and wxEVT_COMMAND_MENU_SELECTED.
Referenced by LoadSettings(), and OnLoaderSelected().
|
protected |
Definition at line 129 of file open_objects_panel.hpp.
Referenced by GetObjectLoader(), Init(), LoadSettings(), SaveSettings(), x_CanLeavePage(), x_GetNextPage(), x_GetOptionsPage(), and x_SelectManager().
|
protected |
Definition at line 126 of file open_objects_panel.hpp.
Referenced by CreateControls(), Init(), OnLoaderSelected(), x_AppendOptionForManager(), and x_SelectManager().
|
protected |
Load Managers corresponding to Loading Options.
Definition at line 131 of file open_objects_panel.hpp.
Referenced by GetObjectLoader(), LoadSettings(), SaveSettings(), SetManagers(), x_CanLeavePage(), x_GetNextPage(), x_GetOptionsPage(), x_GetPanel(), and x_SelectManager().
|
protected |
Definition at line 127 of file open_objects_panel.hpp.
Referenced by Init(), SetManagers(), x_GetPanel(), and x_SelectManager().
|
protected |
Definition at line 124 of file open_objects_panel.hpp.
Referenced by LoadSettings(), SaveSettings(), and SetRegistryPath().
|
protected |
Definition at line 133 of file open_objects_panel.hpp.
Referenced by GetWizardPage(), and SetManagers().