include/ax_resource/ax_settings_librarypage.h

Go to the documentation of this file.
00001 
00002 // Name:        ax_settings_librarypage.h
00003 // Purpose:     
00004 // Author:      Julian Smart
00005 // Modified by: 
00006 // Created:     09/12/2008 18:03:17
00007 // RCS-ID:      
00008 // Copyright:   (c) Anthemion Software Limited
00009 // Licence:     New BSD License
00011 
00012 #ifndef _AX_SETTINGS_LIBRARYPAGE_H_
00013 #define _AX_SETTINGS_LIBRARYPAGE_H_
00014 
00015 /*
00016  * Includes
00017  */
00018 
00021 
00022 /*
00023  * Forward declarations
00024  */
00025 
00028 
00029 class AxResourceLibrarySettings;
00030 class AxResourceLibrary;
00031 
00032 /*
00033  * Control identifiers
00034  */
00035 
00037 #define SYMBOL_AXLIBRARYSETTINGSPAGE_STYLE wxTAB_TRAVERSAL
00038 #define SYMBOL_AXLIBRARYSETTINGSPAGE_TITLE _T("")
00039 #define SYMBOL_AXLIBRARYSETTINGSPAGE_IDNAME ID_AXLIBRARYSETTINGSPAGE
00040 #define SYMBOL_AXLIBRARYSETTINGSPAGE_SIZE wxSize(400, 300)
00041 #define SYMBOL_AXLIBRARYSETTINGSPAGE_POSITION wxDefaultPosition
00043 
00044 
00053 class AxLibrarySettingsPage: public wxPanel
00054 {    
00055     DECLARE_DYNAMIC_CLASS( AxLibrarySettingsPage )
00056     DECLARE_EVENT_TABLE()
00057 
00058 public:
00060     AxLibrarySettingsPage();
00061     AxLibrarySettingsPage(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER|wxTAB_TRAVERSAL);
00062 
00064     bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER|wxTAB_TRAVERSAL);
00065 
00067     ~AxLibrarySettingsPage();
00068 
00070     void Init();
00071 
00073     void CreateControls();
00074 
00077     void Initialize(AxResourceLibrary* library, AxResourceLibrarySettings* settings);
00078 
00080     void PopulateAdditionalPaths();
00081 
00083     virtual bool TransferDataToWindow();
00084     virtual bool TransferDataFromWindow();
00085     
00087     void CheckConsolidate();
00088 
00090     void SetSettings(AxResourceLibrarySettings* settings) { m_settings = settings; }
00091     AxResourceLibrarySettings* GetSettings() const { return m_settings; }
00092 
00094     void SetLibrary(AxResourceLibrary* library) { m_library = library; }
00095     AxResourceLibrary* GetLibrary() const { return m_library; }
00096 
00098 
00100     void OnLibraryPreferencesMainPathBrowseClick( wxCommandEvent& event );
00101 
00103     void OnLibraryPreferencesAddClick( wxCommandEvent& event );
00104 
00106     void OnLibraryPreferencesRemoveClick( wxCommandEvent& event );
00107 
00109     void OnLibraryPreferencesRemoveUpdate( wxUpdateUIEvent& event );
00110 
00112     void OnLibraryPreferencesAddFileTypeClick( wxCommandEvent& event );
00113 
00115     void OnLibraryPreferencesRemoveFileTypeClick( wxCommandEvent& event );
00116 
00118     void OnLibraryPreferencesRemoveFileTypeUpdate( wxUpdateUIEvent& event );
00119 
00121     void OnLibraryPreferencesResetClick( wxCommandEvent& event );
00122 
00124     void OnLibraryDefaultDesignClick( wxCommandEvent& event );
00125 
00127     void OnLibraryConsolidateClick( wxCommandEvent& event );
00128 
00130     void OnLibraryConsolidateUpdate( wxUpdateUIEvent& event );
00131 
00133 
00135 
00137     wxBitmap GetBitmapResource( const wxString& name );
00138 
00140     wxIcon GetIconResource( const wxString& name );
00142 
00144     static bool ShowToolTips();
00145 
00147     wxTextCtrl* m_pathCtrl;
00148     wxListBox* m_additionalPathsCtrl;
00149     wxCheckListBox* m_fileTypesCtrl;
00151     enum {
00152         ID_AXLIBRARYSETTINGSPAGE = 11000,
00153         ID_LIBRARY_PREFERENCES_MAIN_PATH = 11001,
00154         ID_LIBRARY_PREFERENCES_MAIN_PATH_BROWSE = 11002,
00155         ID_LIBRARY_PREFERENCES_ADDITIONAL_PATH = 11003,
00156         ID_LIBRARY_PREFERENCES_ADD = 11004,
00157         ID_LIBRARY_PREFERENCES_REMOVE = 11005,
00158         ID_LIBRARY_PREFERENCES_FILE_TYPES = 11006,
00159         ID_LIBRARY_PREFERENCES_ADD_FILE_TYPE = 11007,
00160         ID_LIBRARY_PREFERENCES_REMOVE_FILE_TYPE = 11008,
00161         ID_LIBRARY_PREFERENCES_RESET = 11009,
00162         ID_LIBRARY_DEFAULT_DESIGN = 11010,
00163         ID_LIBRARY_CONSOLIDATE = 11011
00164     };
00166 
00167     bool                        m_canConsolidate;
00168     AxResourceLibrarySettings*  m_settings;
00169     AxResourceLibrary*          m_library;
00170 };
00171 
00172 #endif
00173     // _AX_SETTINGS_LIBRARYPAGE_H_

Generated on Wed May 6 19:20:18 2009 for AxTk by  doxygen 1.5.1