Version: 0.6.0
newmenu.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Catalog)
3  * Purpose: wxGISNewMenu class.
4  * Author: Dmitry Baryshnikov (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2009,2011,2012,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 #include "wxgis/catalogui/gxcatalogui.h"
23 #include "wxgis/catalogui/gxselection.h"
24 #include "wxgis/framework/applicationbase.h"
25 #include "wxgis/framework/commandbar.h"
26 
27 #define NEWMENUNAME wxT("Application.CreateNewMenu")
28 #define NEWMENUID ID_PLUGINCMDMAX - 1
29 
37 class WXDLLIMPEXP_GIS_CLU wxGISNewMenu :
38  public wxGISMenu,
39  public wxGISCommand
40 {
41 public:
42  wxGISNewMenu(const wxString& sName = NEWMENUNAME, const wxString& sCaption = _("Create"), wxGISEnumCommandBars type = enumGISCBSubMenu, const wxString& title = wxEmptyString, long style = 0);
43  virtual ~wxGISNewMenu(void);
44  //wxGISMenu
45  virtual void AddCommand(wxGISCommand* pCmd);
46  //virtual void RemoveCommand(size_t nIndex){};
47  virtual void MoveCommandLeft(size_t nIndex){};
48  virtual void MoveCommandRight(size_t nIndex){};
49  //wxGISCommand
50  virtual wxIcon GetBitmap(void);
51  virtual wxString GetCaption(void);
52  virtual wxString GetCategory(void);
53  virtual bool GetChecked(void);
54  virtual bool GetEnabled(void);
55  virtual wxString GetMessage(void);
56  virtual wxGISEnumCommandKind GetKind(void);
57  virtual void OnClick(void);
58  virtual bool OnCreate(wxGISApplicationBase* pApp);
59  virtual wxString GetTooltip(void);
60  virtual unsigned char GetCount(void);
61  //wxGISMenu
62  virtual void Update(wxGxSelection* Selection);
63 protected:
64  wxGISApplicationBase* m_pApp;
65  wxGxCatalogUI* m_pCatalog;
66  //wxGISConnectionPointContainer* m_pConnectionPointSelection;
67  //long m_ConnectionPointSelectionCookie;
68 };
69 
70 
Definition: applicationbase.h:65
Definition: commandbar.h:103
Definition: command.h:53
Definition: gxcatalogui.h:34
The GxObject Selection class.
Definition: gxselection.h:30
Definition: newmenu.h:37