OpenASIP
2.0
|
#include <ProDe.hh>
Public Member Functions | |
ProDe () | |
bool | OnInit () |
int | OnExit () |
MainFrame * | mainFrame () const |
ProDeOptions * | options () const |
void | setOptions (ProDeOptions *options) |
CommandRegistry * | commandRegistry () const |
wxDocManager * | docManager () const |
Static Public Member Functions | |
static std::string | bitmapsDirPath () |
Private Member Functions | |
void | createDefaultOptions () |
Private Attributes | |
wxDocManager * | docManager_ |
Manages multiple documents. More... | |
MainFrame * | mainFrame_ |
Main frame of the application. More... | |
ProDeOptions * | options_ |
editor options More... | |
CommandRegistry * | commandRegistry_ |
editor command registry More... | |
Represents the ProDe application.
This class is responsible for parsing the command line and initializing the editor accordingly. If the editor is executed in interactive mode, a graphical user interface will be initialized. The class is derived from wxApp class, which does the low level initialization of wxWindows automatically.
|
static |
Returns path of toolbar icon files.
Definition at line 427 of file ProDe.cc.
References Environment::bitmapsDirPath(), and FileSystem::DIRECTORY_SEPARATOR.
Referenced by AboutDialog::createContents().
CommandRegistry * ProDe::commandRegistry | ( | ) | const |
Returns command registry of the editor.
Definition at line 406 of file ProDe.cc.
References commandRegistry_.
|
private |
Creates default options.
Definition at line 277 of file ProDe.cc.
References GUIOptions::addKeyboardShortcut(), GUIOptions::addSeparator(), GUIOptions::addToolbarButton(), GUIOptions::BOTH, ProDeConstants::CMD_NAME_CLOSE_DOC, ProDeConstants::CMD_NAME_COPY, ProDeConstants::CMD_NAME_CUT, ProDeConstants::CMD_NAME_DELETE_COMP, ProDeConstants::CMD_NAME_EDIT_OPTIONS, ProDeConstants::CMD_NAME_MODIFY_COMP, ProDeConstants::CMD_NAME_NEW_DOC, ProDeConstants::CMD_NAME_OPEN_DOC, ProDeConstants::CMD_NAME_PASTE, ProDeConstants::CMD_NAME_PRINT, ProDeConstants::CMD_NAME_QUIT, ProDeConstants::CMD_NAME_REDO, ProDeConstants::CMD_NAME_SAVE_DOC, ProDeConstants::CMD_NAME_UNDO, ProDeConstants::CMD_NAME_ZOOM_FIT_WIN, ProDeConstants::CMD_NAME_ZOOM_IN, ProDeConstants::CMD_NAME_ZOOM_OUT, UserManualCmd::COMMAND_NAME, options_, GUIOptions::setFullScreen(), GUIOptions::setToolbarLayout(), GUIOptions::setToolbarVisibility(), ProDeOptions::setUndoStackSize(), GUIOptions::setWindowPosition(), and GUIOptions::setWindowSize().
Referenced by OnInit().
wxDocManager * ProDe::docManager | ( | ) | const |
Returns document manager of the editor.
Definition at line 416 of file ProDe.cc.
References docManager_.
MainFrame * ProDe::mainFrame | ( | ) | const |
Returns pointer to the main frame of the editor.
Definition at line 242 of file ProDe.cc.
References mainFrame_.
int ProDe::OnExit | ( | ) |
Deletes the application level dynamic objects not handled by wxWindows.
Called when the editor is about to exit, and all application windows are already destroyed.
Definition at line 227 of file ProDe.cc.
References ProDeClipboard::destroy(), ProDeTextGenerator::destroy(), docManager_, and options_.
bool ProDe::OnInit | ( | ) |
Parses the command line and initializes the editor accordingly.
Called only once by wxWindows when the program is executed. Command line is parsed using wxCmdLineParser class. If no script is provided with a "-s" option, main frame is created and set as the main window. An instance of the wxDocManager will be created to handle document templates, if the editor is ran in interactive mode.
Definition at line 89 of file ProDe.cc.
References GUIOptions::clearModified(), commandRegistry_, Environment::confPath(), createDefaultOptions(), Environment::dataDirPath(), FileSystem::DIRECTORY_SEPARATOR, docManager_, ProDeConstants::EDITOR_NAME, Exception::errorMessage(), FileSystem::fileExists(), Application::initialize(), mainFrame_, options_, GUIOptionsSerializer::readState(), GUIOptions::setFileName(), XMLSerializer::setSchemaFile(), XMLSerializer::setSourceFile(), XMLSerializer::setUseSchema(), WxConversion::toCStringArray(), WxConversion::toString(), TRUE, GUIOptions::validate(), GUIOptions::windowHeight(), GUIOptions::windowWidth(), GUIOptions::xPosition(), and GUIOptions::yPosition().
ProDeOptions * ProDe::options | ( | ) | const |
Returns editor options.
Definition at line 253 of file ProDe.cc.
References options_.
Referenced by setOptions().
void ProDe::setOptions | ( | ProDeOptions * | options | ) |
Sets the editor options, and deletes old options.
options | ProDeOptions to set as new options. |
Definition at line 264 of file ProDe.cc.
References MainFrame::createToolbar(), mainFrame_, options(), and options_.
|
private |
editor command registry
Definition at line 76 of file ProDe.hh.
Referenced by commandRegistry(), and OnInit().
|
private |
Manages multiple documents.
Definition at line 70 of file ProDe.hh.
Referenced by docManager(), OnExit(), and OnInit().
|
private |
Main frame of the application.
Definition at line 72 of file ProDe.hh.
Referenced by mainFrame(), OnInit(), and setOptions().
|
private |
editor options
Definition at line 74 of file ProDe.hh.
Referenced by createDefaultOptions(), OnExit(), OnInit(), options(), and setOptions().