NCBI C++ ToolKit
macro_simple.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_EDIT___MACRO_SIMPLE__HPP
2 #define GUI_WIDGETS_EDIT___MACRO_SIMPLE__HPP
3 /* $Id: macro_simple.hpp 40876 2018-04-25 18:19:21Z filippov $
4  * ===========================================================================
5  *
6  * PUBLIC DOMAIN NOTICE
7  * National Center for Biotechnology Information
8  *
9  * This software/database is a "United States Government Work" under the
10  * terms of the United States Copyright Act. It was written as part of
11  * the author's official duties as a United States Government employee and
12  * thus cannot be copyrighted. This software/database is freely available
13  * to the public for use. The National Library of Medicine and the U.S.
14  * Government have not placed any restriction on its use or reproduction.
15  *
16  * Although all reasonable efforts have been taken to ensure the accuracy
17  * and reliability of the software and data, the NLM and the U.S.
18  * Government do not and cannot warrant the performance or results that
19  * may be obtained by using this software or data. The NLM and the U.S.
20  * Government disclaim all warranties, express or implied, including
21  * warranties of performance, merchantability or fitness for any particular
22  * purpose.
23  *
24  * Please cite the author in any work or product based on this material.
25  *
26  * ===========================================================================
27  *
28  * Authors: Igor Filippov
29  */
30 
31 #include <corelib/ncbistd.hpp>
33 #include <wx/dialog.h>
34 
35 class wxButton;
36 class wxStaticText;
37 class wxTextCtrl;
38 
40 
41 
42 /*!
43  * Control identifiers
44  */
45 
46 ////@begin control identifiers
47 #define SYMBOL_MACRO_SIMPLE_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|wxRESIZE_BORDER
48 #define SYMBOL_MACRO_SIMPLE_TITLE _("Simple Macro Editor")
49 #define SYMBOL_MACRO_SIMPLE_IDNAME ID_MACRO_SIMPLE
50 #define SYMBOL_MACRO_SIMPLE_SIZE wxSize(600, 400)
51 #define SYMBOL_MACRO_SIMPLE_POSITION wxDefaultPosition
52 ////@end control identifiers
53 
54 
55 /*!
56  * CMacroSimple class declaration
57  */
58 
59 class CMacroSimple : public wxDialog
60 {
61  DECLARE_CLASS( CMacroSimple )
62  DECLARE_EVENT_TABLE()
63 
64 public:
65  /// Constructors
66  CMacroSimple();
67  CMacroSimple( wxWindow* parent, const string& text,
68  wxWindowID id = SYMBOL_MACRO_SIMPLE_IDNAME,
69  const wxString& caption = SYMBOL_MACRO_SIMPLE_TITLE,
70  const wxPoint& pos = SYMBOL_MACRO_SIMPLE_POSITION,
71  const wxSize& size = SYMBOL_MACRO_SIMPLE_SIZE,
72  long style = SYMBOL_MACRO_SIMPLE_STYLE );
73 
74  bool Create( wxWindow* parent,
75  wxWindowID id = SYMBOL_MACRO_SIMPLE_IDNAME,
76  const wxString& caption = SYMBOL_MACRO_SIMPLE_TITLE,
77  const wxPoint& pos = SYMBOL_MACRO_SIMPLE_POSITION,
78  const wxSize& size = SYMBOL_MACRO_SIMPLE_SIZE,
79  long style = SYMBOL_MACRO_SIMPLE_STYLE );
80 
81  /// Destructor
82  ~CMacroSimple();
83 
84  /// Initialises member variables
85  void Init();
86 
87  /// Creates the controls and sizers
88  void CreateControls();
89 
90 ////@begin CMacroSimple event handler declarations
91  void OnUpdateText(wxCommandEvent& event);
92  void OnKey(wxKeyEvent & event);
93 ////@end CMacroSimple event handler declarations
94 
95 ////@begin CMacroSimple member function declarations
96 
97  /// Retrieves bitmap resources
98  wxBitmap GetBitmapResource( const wxString& name );
99 
100  /// Retrieves icon resources
101  wxIcon GetIconResource( const wxString& name );
102 
103  /// Should we show tooltips?
104  static bool ShowToolTips();
105 ////@end CMacroSimple member function declarations
106 
107  /// Control identifiers
108  enum {
110  ID_PANEL = 10041,
112  ID_MACROVALIDTEXTCTRL = 10043
113  };
114 
116 private:
117  string m_Text;
118  wxTextCtrl* m_ActionPanel;
119  wxButton* m_AddToScript;
120  wxStaticText* m_Status;
121 
122  macro::CMacroEngine m_MEngine;
123 };
124 
126 
127 #endif
128  // GUI_WIDGETS_EDIT___MACRO_EDITOR_FRAME__HPP
void OnKey(wxKeyEvent &event)
wxTextCtrl * m_ActionPanel
void OnUpdateText(wxCommandEvent &event)
bool Create(wxWindow *parent, wxWindowID id=ID_MACRO_SIMPLE, const wxString &caption=_("Simple Macro Editor"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(600, 400), long style=wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|wxRESIZE_BORDER)
macro::CMacroEngine m_MEngine
~CMacroSimple()
Destructor.
void CreateControls()
Creates the controls and sizers.
void Init()
Initialises member variables.
wxButton * m_AddToScript
CRef< macro::CMacroRep > GetMacro()
wxStaticText * m_Status
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
CMacroSimple()
Constructors.
static bool ShowToolTips()
Should we show tooltips?
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
Macro engine for macro execution.
#define SYMBOL_MACRO_SIMPLE_STYLE
#define SYMBOL_MACRO_SIMPLE_SIZE
#define SYMBOL_MACRO_SIMPLE_TITLE
#define SYMBOL_MACRO_SIMPLE_IDNAME
#define SYMBOL_MACRO_SIMPLE_POSITION
static void text(MDB_val *v)
Definition: mdb_dump.c:62
const struct ncbi::grid::netcache::search::fields::SIZE size
Modified on Wed May 15 15:07:24 2024 by modify_doxy.py rev. 669887