#include <commandeditor/commandeditor.h>
Public Member Functions | |
wxEditorCommandManager () | |
wxEditorCommandManager (const wxEditorCommandManager &manager) | |
~wxEditorCommandManager () | |
void | Init () |
void | Copy (const wxEditorCommandManager &manager) |
void | operator= (const wxEditorCommandManager &manager) |
void | DeleteCommandMenu () |
Deletes the current popup menu, if there was one. | |
int | GetSelection () const |
Get current menu selection. | |
void | SetSelection (int sel) |
Set current menu selection. | |
const wxEditorCommandsArray & | GetFileTypes () const |
wxEditorCommandsArray & | GetFileTypes () |
virtual wxEditorCommands * | GetFileType (const wxString &name, int flags=wxEDITOR_COMMAND_BY_TYPE) |
Finds the file type for the given name. | |
virtual wxEditorCommand * | GetDefaultViewer (const wxString &name, int flags=wxEDITOR_COMMAND_BY_TYPE) |
Finds the current default viewer command for the given type. | |
virtual wxEditorCommand * | GetDefaultEditor (const wxString &name, int flags=wxEDITOR_COMMAND_BY_TYPE) |
Finds the current default editor command for the given type. | |
virtual bool | LaunchViewer (const wxString &filename, const wxString &name, const wxString &viewerCmdName=wxEmptyString, int flags=wxEDITOR_COMMAND_BY_TYPE) |
Launches viewer command for this file. | |
virtual bool | LaunchEditor (const wxString &filename, const wxString &name, const wxString &editorCmdName=wxEmptyString, int flags=wxEDITOR_COMMAND_BY_TYPE) |
Launches editor command for this file. | |
virtual bool | LaunchFile (const wxString &filename, const wxEditorCommand &cmd, const wxString &defaultExtForCmd=wxEmptyString) |
Launches file. | |
virtual bool | LaunchFile (const wxEditorCommandInfo &info) |
virtual bool | LaunchFile (wxWindow *win, const wxArrayString &filenames, const wxArrayString &fileTypes, bool editing, int flags=wxEDITOR_COMMAND_BY_TYPE) |
Launch file either immediately or after user chooses from a menu. | |
virtual bool | LaunchFile (wxWindow *win, const wxString &filename, const wxString &fileType, bool editing, int flags=wxEDITOR_COMMAND_BY_TYPE) |
Single-file version of the above. | |
virtual wxEditorCommandGetCommandStatus | GetCommand (wxWindow *win, const wxArrayString &filenames, const wxArrayString &fileTypes, bool editing, wxEditorCommandInfo *info, int flags=wxEDITOR_COMMAND_BY_TYPE) |
Get the command, possibly prompting via a menu. | |
virtual wxEditorCommandGetCommandStatus | GetCommand (wxWindow *win, const wxString &filename, const wxString &fileType, bool editing, wxEditorCommandInfo *info, int flags=wxEDITOR_COMMAND_BY_TYPE) |
Get the command, possibly prompting via a menu (single filename/type). | |
virtual bool | DoMenuCommand (wxCommandEvent &event) |
Call this from your own menu command handler to finish the LaunchFile sequence. | |
void | SetMenuIdRange (int start, int end) |
Set start and end menu ids. | |
virtual void | AddFileType (const wxEditorCommands &fileType) |
Adds a file type. | |
virtual bool | DeleteFileType (int i) |
Deletes a file type. | |
virtual bool | Save (wxOutputStream &stream, wxDataOutputStream &dataStream) |
Save. | |
virtual bool | Save (const wxString &filename) |
virtual bool | Load (wxInputStream &stream, wxDataInputStream &dataStream) |
Load. | |
virtual bool | Load (const wxString &filename) |
virtual void | Clear () |
Clear. | |
virtual bool | DefaultLaunchFile (const wxString &filename)=0 |
Override this to implement default file launching. | |
Static Public Member Functions | |
static bool | ReadAttributeValue (wxVariant &variant, wxDataInputStream &dataStream) |
static bool | WriteAttributeValue (const wxVariant &variant, wxDataOutputStream &dataStream) |
static bool | WriteAttributeValue (const wxString &value, const wxString &name, wxDataOutputStream &dataStream) |
static bool | WriteAttributeValue (long value, const wxString &name, wxDataOutputStream &dataStream) |
static bool | WriteAttributeValue (int value, const wxString &name, wxDataOutputStream &dataStream) |
static bool | WriteAttributeValue (double value, const wxString &name, wxDataOutputStream &dataStream) |
static bool | WriteAttributeValue (bool value, const wxString &name, wxDataOutputStream &dataStream) |
static bool | WriteAttributeEnd (wxDataOutputStream &dataStream) |
Public Attributes | |
wxEditorCommandsArray | m_fileTypes |
bool | m_currentlyEditing |
For launching command via a menu, if there are several alternatives. | |
wxArrayString | m_currentFileTypes |
wxArrayString | m_currentFilenames |
wxArrayString | m_currentCmdChoices |
wxMenu * | m_currentMenu |
int | m_startMenuId |
int | m_endMenuId |
int | m_currentSelection |
wxEditorCommandManager::wxEditorCommandManager | ( | ) | [inline] |
wxEditorCommandManager::wxEditorCommandManager | ( | const wxEditorCommandManager & | manager | ) | [inline] |
wxEditorCommandManager::~wxEditorCommandManager | ( | ) |
void wxEditorCommandManager::AddFileType | ( | const wxEditorCommands & | fileType | ) | [virtual] |
Adds a file type.
void wxEditorCommandManager::Clear | ( | ) | [virtual] |
Clear.
void wxEditorCommandManager::Copy | ( | const wxEditorCommandManager & | manager | ) |
virtual bool wxEditorCommandManager::DefaultLaunchFile | ( | const wxString & | filename | ) | [pure virtual] |
Override this to implement default file launching.
void wxEditorCommandManager::DeleteCommandMenu | ( | ) |
Deletes the current popup menu, if there was one.
bool wxEditorCommandManager::DeleteFileType | ( | int | i | ) | [virtual] |
Deletes a file type.
bool wxEditorCommandManager::DoMenuCommand | ( | wxCommandEvent & | event | ) | [virtual] |
Call this from your own menu command handler to finish the LaunchFile sequence.
wxEditorCommandGetCommandStatus wxEditorCommandManager::GetCommand | ( | wxWindow * | win, | |
const wxString & | filename, | |||
const wxString & | fileType, | |||
bool | editing, | |||
wxEditorCommandInfo * | info, | |||
int | flags = wxEDITOR_COMMAND_BY_TYPE | |||
) | [virtual] |
Get the command, possibly prompting via a menu (single filename/type).
wxEditorCommandGetCommandStatus wxEditorCommandManager::GetCommand | ( | wxWindow * | win, | |
const wxArrayString & | filenames, | |||
const wxArrayString & | fileTypes, | |||
bool | editing, | |||
wxEditorCommandInfo * | info, | |||
int | flags = wxEDITOR_COMMAND_BY_TYPE | |||
) | [virtual] |
Get the command, possibly prompting via a menu.
wxEditorCommand * wxEditorCommandManager::GetDefaultEditor | ( | const wxString & | name, | |
int | flags = wxEDITOR_COMMAND_BY_TYPE | |||
) | [virtual] |
Finds the current default editor command for the given type.
wxEditorCommand * wxEditorCommandManager::GetDefaultViewer | ( | const wxString & | name, | |
int | flags = wxEDITOR_COMMAND_BY_TYPE | |||
) | [virtual] |
Finds the current default viewer command for the given type.
wxEditorCommands * wxEditorCommandManager::GetFileType | ( | const wxString & | name, | |
int | flags = wxEDITOR_COMMAND_BY_TYPE | |||
) | [virtual] |
Finds the file type for the given name.
wxEditorCommandsArray& wxEditorCommandManager::GetFileTypes | ( | ) | [inline] |
const wxEditorCommandsArray& wxEditorCommandManager::GetFileTypes | ( | ) | const [inline] |
int wxEditorCommandManager::GetSelection | ( | ) | const [inline] |
Get current menu selection.
void wxEditorCommandManager::Init | ( | ) |
bool wxEditorCommandManager::LaunchEditor | ( | const wxString & | filename, | |
const wxString & | name, | |||
const wxString & | editorCmdName = wxEmptyString , |
|||
int | flags = wxEDITOR_COMMAND_BY_TYPE | |||
) | [virtual] |
Launches editor command for this file.
If editorCmdName is empty, uses the user-specified default command for this type.
bool wxEditorCommandManager::LaunchFile | ( | wxWindow * | win, | |
const wxString & | filename, | |||
const wxString & | fileType, | |||
bool | editing, | |||
int | flags = wxEDITOR_COMMAND_BY_TYPE | |||
) | [virtual] |
Single-file version of the above.
bool wxEditorCommandManager::LaunchFile | ( | wxWindow * | win, | |
const wxArrayString & | filenames, | |||
const wxArrayString & | fileTypes, | |||
bool | editing, | |||
int | flags = wxEDITOR_COMMAND_BY_TYPE | |||
) | [virtual] |
Launch file either immediately or after user chooses from a menu.
Add filenames and corresponding file types (e.g. "Epub files")
bool wxEditorCommandManager::LaunchFile | ( | const wxEditorCommandInfo & | info | ) | [virtual] |
bool wxEditorCommandManager::LaunchFile | ( | const wxString & | filename, | |
const wxEditorCommand & | cmd, | |||
const wxString & | defaultExtForCmd = wxEmptyString | |||
) | [virtual] |
Launches file.
bool wxEditorCommandManager::LaunchViewer | ( | const wxString & | filename, | |
const wxString & | name, | |||
const wxString & | viewerCmdName = wxEmptyString , |
|||
int | flags = wxEDITOR_COMMAND_BY_TYPE | |||
) | [virtual] |
Launches viewer command for this file.
If viewerCmdName is empty, uses the user-specified default command for this type.
bool wxEditorCommandManager::Load | ( | const wxString & | filename | ) | [virtual] |
bool wxEditorCommandManager::Load | ( | wxInputStream & | stream, | |
wxDataInputStream & | dataStream | |||
) | [virtual] |
Load.
void wxEditorCommandManager::operator= | ( | const wxEditorCommandManager & | manager | ) | [inline] |
bool wxEditorCommandManager::ReadAttributeValue | ( | wxVariant & | variant, | |
wxDataInputStream & | dataStream | |||
) | [static] |
bool wxEditorCommandManager::Save | ( | const wxString & | filename | ) | [virtual] |
bool wxEditorCommandManager::Save | ( | wxOutputStream & | stream, | |
wxDataOutputStream & | dataStream | |||
) | [virtual] |
Save.
void wxEditorCommandManager::SetMenuIdRange | ( | int | start, | |
int | end | |||
) | [inline] |
Set start and end menu ids.
void wxEditorCommandManager::SetSelection | ( | int | sel | ) | [inline] |
Set current menu selection.
bool wxEditorCommandManager::WriteAttributeEnd | ( | wxDataOutputStream & | dataStream | ) | [static] |
bool wxEditorCommandManager::WriteAttributeValue | ( | bool | value, | |
const wxString & | name, | |||
wxDataOutputStream & | dataStream | |||
) | [static] |
bool wxEditorCommandManager::WriteAttributeValue | ( | double | value, | |
const wxString & | name, | |||
wxDataOutputStream & | dataStream | |||
) | [static] |
bool wxEditorCommandManager::WriteAttributeValue | ( | int | value, | |
const wxString & | name, | |||
wxDataOutputStream & | dataStream | |||
) | [static] |
bool wxEditorCommandManager::WriteAttributeValue | ( | long | value, | |
const wxString & | name, | |||
wxDataOutputStream & | dataStream | |||
) | [static] |
bool wxEditorCommandManager::WriteAttributeValue | ( | const wxString & | value, | |
const wxString & | name, | |||
wxDataOutputStream & | dataStream | |||
) | [static] |
bool wxEditorCommandManager::WriteAttributeValue | ( | const wxVariant & | variant, | |
wxDataOutputStream & | dataStream | |||
) | [static] |
wxArrayString wxEditorCommandManager::m_currentCmdChoices |
wxArrayString wxEditorCommandManager::m_currentFilenames |
wxArrayString wxEditorCommandManager::m_currentFileTypes |
For launching command via a menu, if there are several alternatives.
wxEditorCommandsArray wxEditorCommandManager::m_fileTypes |