wxArt2D
execdlg.h
1 /*! \file wx/editor/execdlg.h
2  \brief Definition of class for dialog to run/create a processfile, in which commands can be executed seperately.
3  \author Probably Klaas Holwerda
4  \date Created 05/07/03
5 
6  Copyright: (c)
7 
8  Licence: wxWidgets licence
9 
10  RCS-ID: $Id: execdlg.h,v 1.10 2009/09/26 19:01:05 titato Exp $
11 */
12 
13 #ifndef _WX_EXECDLGH__
14 #define _WX_EXECDLGH__
15 
16 #include "wx/canvas/canmod.h"
17 
18 //! GUI listbox with copy feature.
19 class A2DEDITORDLLEXP CopywxListBox: public wxListBox
20 
21 {
22 
23 public:
24 
25  CopywxListBox( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
26  int n, const wxString choices[], long style );
27 
28  void OnMouseRightDown( class wxMouseEvent& );
29  void CopySel( class wxCommandEvent& event );
30  void CopyAll( class wxCommandEvent& event );
31 
32  wxMenu* m_mousemenu; // the floating menu
33 
34  // Declare used events.
35  DECLARE_EVENT_TABLE()
36 
37 };
38 
39 
40 ////@begin control identifiers
41 #define IDEntry_DIALOG 10004
42 #define SYMBOL_A2DCOORDINATEENTRY_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
43 #define SYMBOL_A2DCOORDINATEENTRY_TITLE _("SetCursor")
44 #define SYMBOL_A2DCOORDINATEENTRY_IDNAME IDEntry_DIALOG
45 #define SYMBOL_A2DCOORDINATEENTRY_SIZE wxSize(400, 300)
46 #define SYMBOL_A2DCOORDINATEENTRY_POSITION wxDefaultPosition
47 #define IDentry_X 10000
48 #define IDentry_Y 10001
49 #define IDentry_CalcCoord 10002
50 #define IDentry_CartPolar 10003
51 #define IDentry_AbsRel 10005
52 #define IDentry_Snap 10006
53 #define IDentry_Hide 10007
54 #define IDentry_Apply 10008
55 #define IDentry_Cancel 10009
56 ////@end control identifiers
57 
58 /*!
59  * Compatibility
60  */
61 
62 #ifndef wxCLOSE_BOX
63 #define wxCLOSE_BOX 0x1000
64 #endif
65 #ifndef wxFIXED_MINSIZE
66 #define wxFIXED_MINSIZE 0
67 #endif
68 
69 /*!
70  * a2dCoordinateEntry class declaration
71  */
72 
73 class a2dCoordinateEntry: public wxDialog
74 {
75  DECLARE_DYNAMIC_CLASS( a2dCoordinateEntry )
76  DECLARE_EVENT_TABLE()
77 
78 public:
79  /// Constructors
81  a2dCoordinateEntry( wxWindow* parent, wxWindowID id = SYMBOL_A2DCOORDINATEENTRY_IDNAME, bool modal = false, const wxString& caption = SYMBOL_A2DCOORDINATEENTRY_TITLE, const wxPoint& pos = SYMBOL_A2DCOORDINATEENTRY_POSITION, const wxSize& size = SYMBOL_A2DCOORDINATEENTRY_SIZE, long style = SYMBOL_A2DCOORDINATEENTRY_STYLE );
82 
83  /// Creation
84  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_A2DCOORDINATEENTRY_IDNAME, const wxString& caption = SYMBOL_A2DCOORDINATEENTRY_TITLE, const wxPoint& pos = SYMBOL_A2DCOORDINATEENTRY_POSITION, const wxSize& size = SYMBOL_A2DCOORDINATEENTRY_SIZE, long style = SYMBOL_A2DCOORDINATEENTRY_STYLE );
85 
86  /// Creates the controls and sizers
87  void CreateControls( long style );
88 
89  /// wxEVT_COMMAND_TEXT_ENTER event handler for IDentry_X
90  void OnEntryXEnter( wxCommandEvent& event );
91 
92  /// wxEVT_COMMAND_TEXT_ENTER event handler for IDentry_Y
93  void OnEntryYEnter( wxCommandEvent& event );
94 
95  /// wxEVT_COMMAND_TEXT_ENTER event handler for IDentry_CalcCoord
96  void OnEntryCalccoordEnter( wxCommandEvent& event );
97 
98  /// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for IDentry_CartPolar
99  void OnEntryCartpolarSelected( wxCommandEvent& event );
100 
101  /// wxEVT_COMMAND_RADIOBOX_SELECTED event handler for IDentry_AbsRel
102  void OnEntryAbsrelSelected( wxCommandEvent& event );
103 
104  /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for IDentry_Snap
105  void OnEntrySnapClick( wxCommandEvent& event );
106 
107  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for IDentry_Hide
108  void OnEntryHideClick( wxCommandEvent& event );
109 
110  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for IDentry_Apply
111  void OnEntryApplyClick( wxCommandEvent& event );
112 
113  /// wxEVT_COMMAND_BUTTON_CLICKED event handler for IDentry_Cancel
114  void OnEntryCancelClick( wxCommandEvent& event );
115 
116  /// Retrieves bitmap resources
117  wxBitmap GetBitmapResource( const wxString& name );
118 
119  /// Retrieves icon resources
120  wxIcon GetIconResource( const wxString& name );
121 
122  /// Should we show tooltips?
123  static bool ShowToolTips();
124 
125  /// based on the current setting calculate the cursor position
126  void CalcCoordinate();
127 
128  wxTextCtrl* m_x;
129  wxTextCtrl* m_y;
130  wxTextCtrl* m_calcCoord;
131  wxRadioBox* m_cartPolar;
132  wxRadioBox* m_absRel;
133  wxCheckBox* m_snap;
134  wxButton* m_hide;
135  wxButton* m_apply;
136  wxButton* m_cancel;
137 
138  wxStaticText* m_xText;
139  wxStaticText* m_yText;
140 
141  double m_xcalc;
142  double m_ycalc;
143 
144  bool m_modal;
145 };
146 
147 
148 
149 #endif
void OnEntryCartpolarSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBOX_SELECTED event handler for IDentry_CartPolar
Definition: execdlg.cpp:301
bool Create(wxWindow *parent, wxWindowID id=SYMBOL_A2DCOORDINATEENTRY_IDNAME, const wxString &caption=SYMBOL_A2DCOORDINATEENTRY_TITLE, const wxPoint &pos=SYMBOL_A2DCOORDINATEENTRY_POSITION, const wxSize &size=SYMBOL_A2DCOORDINATEENTRY_SIZE, long style=SYMBOL_A2DCOORDINATEENTRY_STYLE)
Creation.
Definition: execdlg.cpp:132
void OnEntryCancelClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for IDentry_Cancel
Definition: execdlg.cpp:382
a2dCoordinateEntry()
Constructors.
Definition: execdlg.cpp:118
void OnEntrySnapClick(wxCommandEvent &event)
wxEVT_COMMAND_CHECKBOX_CLICKED event handler for IDentry_Snap
Definition: execdlg.cpp:330
void OnEntryApplyClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for IDentry_Apply
Definition: execdlg.cpp:349
void OnEntryHideClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for IDentry_Hide
Definition: execdlg.cpp:339
void OnEntryYEnter(wxCommandEvent &event)
wxEVT_COMMAND_TEXT_ENTER event handler for IDentry_Y
Definition: execdlg.cpp:283
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
Definition: execdlg.cpp:253
void OnEntryXEnter(wxCommandEvent &event)
wxEVT_COMMAND_TEXT_ENTER event handler for IDentry_X
Definition: execdlg.cpp:273
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
Definition: execdlg.cpp:263
static bool ShowToolTips()
Should we show tooltips?
Definition: execdlg.cpp:244
void OnEntryCalccoordEnter(wxCommandEvent &event)
wxEVT_COMMAND_TEXT_ENTER event handler for IDentry_CalcCoord
Definition: execdlg.cpp:292
void CalcCoordinate()
based on the current setting calculate the cursor position
Definition: execdlg.cpp:387
void OnEntryAbsrelSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBOX_SELECTED event handler for IDentry_AbsRel
Definition: execdlg.cpp:321
all headers of the canvas module
void CreateControls(long style)
Creates the controls and sizers.
Definition: execdlg.cpp:158
GUI listbox with copy feature.
Definition: execdlg.h:19
execdlg.h Source File -- Sun Oct 12 2014 17:04:19 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation