Version: 0.6.0
catalogcmd.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Catalog)
3  * Purpose: Catalog Main Commands class.
4  * Author: Dmitry Baryshnikov (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2009-2014 Dmitry Baryshnikov
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  ****************************************************************************/
21 #pragma once
22 
23 #include "wxgis/framework/command.h"
24 #include "wxgis/catalogui/gxapplication.h"
25 
26 enum wxGISEnumCatalogMainCmdType{
27  enumGISCatalogMainCmdUpOneLevel = 0,
28  enumGISCatalogMainCmdConnectFolder,
29  enumGISCatalogMainCmdDisconnectFolder,
30  enumGISCatalogMainCmdLocation,
31  enumGISCatalogMainCmdDelete,
32  enumGISCatalogMainCmdBack,
33  enumGISCatalogMainCmdForward,
34  enumGISCatalogMainCmdCreateFolder,
35  enumGISCatalogMainCmdRename,
36  enumGISCatalogMainCmdRefresh,
37  enumGISCatalogMainCmdProperties,
38  enumGISCatalogMainCmdCopy,
39  enumGISCatalogMainCmdCut,
40  enumGISCatalogMainCmdPaste,
41  enumGISCatalogMainCmdSendEmail,
42  enumGISCatalogMainCmdConnect,
43  enumGISCatalogMainCmdDisconnect,
44  enumGISCatalogMainCmdMax
45 };
46 
55  public wxGISCommand,
56  public IToolControl,
57  public IDropDownCommand
58 {
59  DECLARE_DYNAMIC_CLASS(wxGISCatalogMainCmd)
60 
61 public:
62  wxGISCatalogMainCmd(void);
63  virtual ~wxGISCatalogMainCmd(void);
64  //wxGISCommand
65  virtual wxIcon GetBitmap(void);
66  virtual wxString GetCaption(void);
67  virtual wxString GetCategory(void);
68  virtual bool GetChecked(void);
69  virtual bool GetEnabled(void);
70  virtual wxString GetMessage(void);
71  virtual wxGISEnumCommandKind GetKind(void);
72  virtual void OnClick(void);
73  virtual bool OnCreate(wxGISApplicationBase* pApp);
74  virtual wxString GetTooltip(void);
75  virtual unsigned char GetCount(void);
76  //IToolControl
77  virtual IToolBarControl* GetControl(void);
78  virtual wxString GetToolLabel(void);
79  virtual bool HasToolLabel(void);
80  //IDropDownCommand
81  virtual wxMenu* GetDropDownMenu(void);
82  virtual void OnDropDownCommand(int nID);
83 protected:
84  bool AddGxObjectToZip(wxArrayString &saPaths, void* hZIP, wxGxObject* pGxObject, const CPLString &szPath = "");
85  void AddFileToZip(const CPLString &szPath, void* hZIP, GByte **pabyBuffer, size_t nBufferSize, const CPLString &szPrependPath, const wxString &sCharset);
86 protected:
87  wxGISApplicationBase* m_pApp;
88  wxGxApplicationBase* m_pGxApp;
89  wxIcon m_IconFolderUp, m_IconFolderConn, m_IconFolderConnDel, m_IconDel, m_IconGoPrev, m_IconGoNext;
90  wxIcon m_IconFolderNew, m_IconEdit, m_IconViewRefresh, m_IconProps;
91  wxIcon m_LargeFolderIcon, m_SmallFolderIcon;
92  wxIcon m_CopyIcon, m_CutIcon, m_PasteIcon;
93  wxIcon m_EmailIcon, m_ConnectIcon;
94  short m_nPrevNextSelCount;
95 };
virtual void OnClick(void)
Definition: catalogcmd.cpp:485
An Interface class for GxApplication.
Definition: gxselection.h:80
Definition: command.h:110
Definition: applicationbase.h:65
virtual wxMenu * GetDropDownMenu(void)
Return DropDown Menu to show under button.
Definition: catalogcmd.cpp:1195
Definition: command.h:53
Definition: catalogcmd.h:54
Definition: command.h:92
Definition: command.h:151
virtual void OnDropDownCommand(int nID)
Execute the DropDown menu command.
Definition: catalogcmd.cpp:1263
Definition: gxobject.h:37