NCBI C++ ToolKit
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
CTextAlignLoaderManager Class Reference

Search Toolkit Book for CTextAlignLoaderManager

CTextAlignLoaderManager. More...

#include "text_align_load_manager.hpp"
(Private to src/gui/packages/pkg_alignment.)

+ Inheritance diagram for CTextAlignLoaderManager:
+ Collaboration diagram for CTextAlignLoaderManager:

List of all members.

Classes

class  CPage

Public Member Functions

 CTextAlignLoaderManager ()
 CTextAlignLoaderManager.
IFileLoadPanelClient interface implementation
virtual string GetLabel () const
virtual wxString GetFormatWildcard () const
 return file wildcard for the format (example - "*.txt;*.tab" )
virtual string GetFileLoaderId () const
IUILoadManager interface implementation
virtual void SetServiceLocator (IServiceLocator *srv_locator)
 Sets / unsets Service Locator.
virtual void SetParentWindow (wxWindow *parent)
virtual const IUIObjectGetDescriptor () const
 Returns the object describing this tool (UI meta data).
virtual void InitUI ()
 Initializes the Manager before using it in UI.
virtual void CleanUI ()
 CleanUI() is called after the host finished using the manager.
virtual wxPanel * GetCurrentPanel ()
 Return the panel corresponding to the current state of Tool Manager.
virtual bool CanDo (EAction action)
 Indicates whether given transition is possible in the current state.
virtual bool IsFinalState ()
 True if Tool Manager has reached its final state, i.e.
virtual bool IsCompletedState ()
 Manager goes into "Complete" state when "Finish" button is pressed and all input data is gatherred and validated.
virtual bool DoTransition (EAction action)
 Performs transition if possible and returns true, otherwise the function shall warn the user about the problem preventing the transition (such as insufficient or invalid input) and return false.
virtual IAppTaskGetTask ()
 Once parameters are gathered and validated this function is called to produce the final Task object that will be executed to do the actual computational work.
virtual IWizardPageGetFirstPage ()
 Returns first options page (if any) of the tool to be shown in wizard dialog.
virtual IWizardPageGetOptionsPage ()
 Returns page for tool options (long wizard path via "Options" button)
virtual void SetPrevPage (IWizardPage *prevPage)
 Sets a wizard page which should show before the first page of the tool.
virtual IExecuteUnitGetExecuteUnit ()
virtual wxString GetFormatWildcard ()
virtual bool ValidateFilenames (const vector< wxString > &filenames)
 checks given filenames and returns true if the manager can handle them, otherwise - shows an error message
virtual void SetFilenames (const vector< wxString > &filenames)
 initilize the manager with the given filenames
virtual void GetFilenames (vector< wxString > &filenames) const
 get actual filenames that will be opened
virtual bool IsInitialState ()
 return true if the current state of the loader UI is the first valid state (first step in a wizard-like sequence)
virtual bool RecognizeFormat (const wxString &filename)
 return true if the given file format is supported by this manager
virtual bool RecognizeFormat (CFormatGuess::EFormat fmt)
 return true if the given file format is supported by this manager
IExtension interface implementation
virtual string GetExtensionIdentifier () const
 returns the unique human-readable identifier for the extension the id should use lowercase letters separated by underscores - "like_this"
virtual string GetExtensionLabel () const
 returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
IRegSettings interface implementation
virtual void SetRegistryPath (const string &path)
virtual void LoadSettings ()
virtual void SaveSettings () const

Static Public Member Functions

static string Id ()
static string Label ()

Protected Types

enum  EState { eInvalid = -1, eParams, eCompleted }

Protected Member Functions

CTextAlignParamsPanelx_GetParamsPanel ()

Protected Attributes

CUIObject m_Descr
IServiceLocatorm_SrvLocator
wxWindow * m_ParentWindow
EState m_State
string m_RegPath
CTextAlignParamsPanelm_ParamsPanel
CTextAlignParams m_Params
vector< wxString > m_FileNames
CPage m_OptionsPage

Detailed Description

CTextAlignLoaderManager.

Definition at line 59 of file text_align_load_manager.hpp.


Member Enumeration Documentation

Enumerator:
eInvalid 
eParams 
eCompleted 

Definition at line 124 of file text_align_load_manager.hpp.


Constructor & Destructor Documentation


Member Function Documentation

Indicates whether given transition is possible in the current state.

Implements IUIToolManager.

Definition at line 126 of file text_align_load_manager.cpp.

References _ASSERT, IUIToolManager::eBack, eCompleted, IUIToolManager::eNext, eParams, and m_State.

CleanUI() is called after the host finished using the manager.

This function shall free resources associated with the session and reset internal state.

Implements IUIToolManager.

Definition at line 104 of file text_align_load_manager.cpp.

References eInvalid, m_ParamsPanel, and m_State.

Performs transition if possible and returns true, otherwise the function shall warn the user about the problem preventing the transition (such as insufficient or invalid input) and return false.

Typically this function would take user input from the current panel, validate the input and go to the next state creating new UI panel if needed.

Implements IUIToolManager.

Definition at line 152 of file text_align_load_manager.cpp.

References _ASSERT, IUIToolManager::eBack, eCompleted, IUIToolManager::eNext, eParams, CTextAlignParamsPanel::GetData(), m_Params, m_ParamsPanel, m_State, and CTextAlignParamsPanel::TransferDataFromWindow().

Return the panel corresponding to the current state of Tool Manager.

Implements IUIToolManager.

Definition at line 111 of file text_align_load_manager.cpp.

References eParams, m_State, and x_GetParamsPanel().

Returns the object describing this tool (UI meta data).

Implements IUIToolManager.

Definition at line 92 of file text_align_load_manager.cpp.

References m_Descr.

Reimplemented from IFileLoadPanelClient.

Definition at line 176 of file text_align_load_manager.cpp.

References m_FileNames, and m_Params.

returns the unique human-readable identifier for the extension the id should use lowercase letters separated by underscores - "like_this"

Implements IExtension.

Definition at line 228 of file text_align_load_manager.cpp.

returns a displayable label for this extension ( please capitalize the key words - "My Extension" )

Implements IExtension.

Definition at line 234 of file text_align_load_manager.cpp.

virtual string CTextAlignLoaderManager::GetFileLoaderId ( ) const [inline, virtual]

Implements IFileFormatLoaderManager.

Definition at line 74 of file text_align_load_manager.hpp.

References Id().

void CTextAlignLoaderManager::GetFilenames ( vector< wxString > &  filenames) const [virtual]

get actual filenames that will be opened

Implements IFileFormatLoaderManager.

Definition at line 200 of file text_align_load_manager.cpp.

References m_FileNames.

virtual IWizardPage* CTextAlignLoaderManager::GetFirstPage ( ) [inline, virtual]

Returns first options page (if any) of the tool to be shown in wizard dialog.

Reimplemented from IToolWizard.

Definition at line 90 of file text_align_load_manager.hpp.

wxString CTextAlignLoaderManager::GetFormatWildcard ( ) const [virtual]

return file wildcard for the format (example - "*.txt;*.tab" )

Implements IFileLoadPanelClient.

Definition at line 71 of file text_align_load_manager.cpp.

References CFileExtensions::GetDialogFilter(), and CFileExtensions::kAllFiles.

string CTextAlignLoaderManager::GetLabel ( void  ) const [virtual]

Implements IFileLoadPanelClient.

Definition at line 66 of file text_align_load_manager.cpp.

References CUIObject::GetLabel(), and m_Descr.

virtual IWizardPage* CTextAlignLoaderManager::GetOptionsPage ( ) [inline, virtual]

Returns page for tool options (long wizard path via "Options" button)

Reimplemented from IToolWizard.

Definition at line 91 of file text_align_load_manager.hpp.

References m_OptionsPage.

Once parameters are gathered and validated this function is called to produce the final Task object that will be executed to do the actual computational work.

Implements IUIToolManager.

Definition at line 171 of file text_align_load_manager.cpp.

static string CTextAlignLoaderManager::Id ( void  ) [inline, static]

Definition at line 120 of file text_align_load_manager.hpp.

Referenced by GetFileLoaderId().

void CTextAlignLoaderManager::InitUI ( ) [virtual]

Initializes the Manager before using it in UI.

This function shall reset Internal state of the tool.

Implements IUIToolManager.

Definition at line 98 of file text_align_load_manager.cpp.

References eParams, and m_State.

Manager goes into "Complete" state when "Finish" button is pressed and all input data is gatherred and validated.

Typically this is the last state after Final state. This state does not have an associated UI panel. When manager reaches the “Completed” state the framework hides the dialog and calls GetTask() function.

Implements IUIToolManager.

Definition at line 146 of file text_align_load_manager.cpp.

References eCompleted, and m_State.

True if Tool Manager has reached its final state, i.e.

the last page (panel) in the sequence is displayed and "Finish" button is shown. The framework calls this function to decide whether “Finish” or “Next” button needs to be shown.

Implements IUIToolManager.

Definition at line 140 of file text_align_load_manager.cpp.

References eParams, and m_State.

return true if the current state of the loader UI is the first valid state (first step in a wizard-like sequence)

Implements IFileFormatLoaderManager.

Definition at line 205 of file text_align_load_manager.cpp.

References eParams, and m_State.

static string CTextAlignLoaderManager::Label ( ) [inline, static]

Definition at line 121 of file text_align_load_manager.hpp.

Implements IRegSettings.

Definition at line 252 of file text_align_load_manager.cpp.

References CTextAlignParams::LoadSettings(), and m_Params.

bool CTextAlignLoaderManager::RecognizeFormat ( const wxString &  filename) [virtual]

return true if the given file format is supported by this manager

Implements IFileFormatLoaderManager.

Definition at line 211 of file text_align_load_manager.cpp.

References CFileExtensions::kTxt, and CFileExtensions::RecognizeExtension().

return true if the given file format is supported by this manager

Implements IFileFormatLoaderManager.

Definition at line 218 of file text_align_load_manager.cpp.

References CFormatGuess::eAlignment.

void CTextAlignLoaderManager::SaveSettings ( ) const [virtual]

Implements IRegSettings.

Definition at line 246 of file text_align_load_manager.cpp.

References m_Params, and CTextAlignParams::SaveSettings().

void CTextAlignLoaderManager::SetFilenames ( const vector< wxString > &  filenames) [virtual]

initilize the manager with the given filenames

Implements IFileFormatLoaderManager.

Definition at line 195 of file text_align_load_manager.cpp.

References filenames, and m_FileNames.

void CTextAlignLoaderManager::SetParentWindow ( wxWindow *  parent) [virtual]

Implements IToolWizard.

Definition at line 86 of file text_align_load_manager.cpp.

References m_ParentWindow.

virtual void CTextAlignLoaderManager::SetPrevPage ( IWizardPage ) [inline, virtual]

Sets a wizard page which should show before the first page of the tool.

Reimplemented from IToolWizard.

Definition at line 92 of file text_align_load_manager.hpp.

References m_OptionsPage, and CWizardPage::SetPrevPage().

Implements IRegSettings.

Definition at line 240 of file text_align_load_manager.cpp.

References m_Params, m_RegPath, and CTextAlignParams::SetRegistryPath().

Sets / unsets Service Locator.

Tool Manager can use the locator to obtain the services necessary services.

Implements IUIToolManager.

Definition at line 80 of file text_align_load_manager.cpp.

References m_SrvLocator.

bool CTextAlignLoaderManager::ValidateFilenames ( const vector< wxString > &  filenames) [virtual]

checks given filenames and returns true if the manager can handle them, otherwise - shows an error message

Implements IFileFormatLoaderManager.

Definition at line 188 of file text_align_load_manager.cpp.


Member Data Documentation

Definition at line 142 of file text_align_load_manager.hpp.

Referenced by CTextAlignLoaderManager(), GetDescriptor(), and GetLabel().

Definition at line 152 of file text_align_load_manager.hpp.

Referenced by GetExecuteUnit(), GetFilenames(), and SetFilenames().

Definition at line 154 of file text_align_load_manager.hpp.

Referenced by GetOptionsPage(), and SetPrevPage().

Definition at line 150 of file text_align_load_manager.hpp.

Referenced by CleanUI(), DoTransition(), and x_GetParamsPanel().

Definition at line 145 of file text_align_load_manager.hpp.

Referenced by SetParentWindow(), and x_GetParamsPanel().

Definition at line 148 of file text_align_load_manager.hpp.

Referenced by SetRegistryPath().

Definition at line 144 of file text_align_load_manager.hpp.

Referenced by SetServiceLocator().


The documentation for this class was generated from the following files:
Modified on Thu Aug 21 18:02:11 2014 by modify_doxy.py rev. 426318