Files
MagicSetEditor2/src/gui/symbol/window.hpp
T
twanvl ae14784fd6 Reduce coupling between ValueEditors/Viewers and Set and StyleSheet.
- Adding of actions is done with an addAction function
 - Files are read from
     - getStylePackage for styling stuff (this is stylesheet)
     - getLocalPackage for symbol and image values (this was the set)


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@970 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-06-04 00:21:06 +00:00

76 lines
2.5 KiB
C++

//+----------------------------------------------------------------------------+
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
//| Copyright: (C) 2001 - 2008 Twan van Laarhoven and "coppro" |
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
#ifndef HEADER_GUI_SYMBOL_WINDOW
#define HEADER_GUI_SYMBOL_WINDOW
// ----------------------------------------------------------------------------- : Includes
#include <util/prec.hpp>
#include <data/symbol.hpp>
#include <wx/listctrl.h>
class SymbolControl;
class SymbolPartList;
DECLARE_POINTER_TYPE(ValueActionPerformer);
// ----------------------------------------------------------------------------- : SymbolWindow
/// The window for editing symbols
class SymbolWindow : public Frame {
public:
/// Construct a SymbolWindow
SymbolWindow(Window* parent);
/// Construct a SymbolWindow showing a symbol from a file
SymbolWindow(Window* parent, const String& filename);
/// Construct a SymbolWindow showing a symbol value in a set
SymbolWindow(Window* parent, ValueActionPerformer* performer);
~SymbolWindow();
private:
// --------------------------------------------------- : Children
/// Actual initialisation
void init(Window* parent, SymbolP symbol);
SymbolControl* control; ///< The control for editing/displaying the symbol
SymbolPartList* parts; ///< A list of parts in the symbol
// when editing a symbol field
ValueActionPerformer* performer;
// --------------------------------------------------- : Event handling
DECLARE_EVENT_TABLE();
void onFileNew (wxCommandEvent&);
void onFileOpen (wxCommandEvent&);
void onFileSave (wxCommandEvent&);
void onFileSaveAs(wxCommandEvent&);
void onFileStore (wxCommandEvent&);
void onFileExit (wxCommandEvent&);
void onEditUndo (wxCommandEvent&);
void onEditRedo (wxCommandEvent&);
void onModeChange(wxCommandEvent&);
void onExtraTool (wxCommandEvent&);
void onUpdateUI(wxUpdateUIEvent&);
/// Changing selected parts in the list
void onSelectFromList(wxCommandEvent& ev);
/// Activating a part: open the point editor
void onActivateFromList(wxCommandEvent& ev);
bool inSelectionEvent; ///< Prevent recursion in onSelect...
public:
void onSelectFromControl();
};
// ----------------------------------------------------------------------------- : EOF
#endif