VR-Vantage 3.0 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ciPanel.h
Go to the documentation of this file.
1 
2 // Copyright JRM Enterprises, Inc. 2004
3 // All rights reserved.
4 //
5 // This code is the intellectual property of JRM Enterprises, Inc.
6 // It may not be used or released as source or compiled binary form
7 // without the prior written consent of JRM Enterprises, Inc.
8 //
9 // Original Author: Nikolai Fedoroff
10 // Date: Sept 2004
11 //
12 // ciPanel.cpp: implementation of generic ciPanel base class.
13 // ciPanel.h: interface for generic ciPanel base class.
14 //
15 //
16 // $Header: /cvsroot/CommonInterface/CILib/include/ciPanel.h,v 1.19 2006-07-13 15:53:38 cvsuser Exp $
17 //
18 // $Log: not supported by cvs2svn $
19 // Revision 1.19 2006/07/13 15:53:38 cvsuser
20 // (Tim)added checks for the GUI which change the input to something appropreate
21 //
22 // Revision 1.18 2006/04/01 20:41:55 cvsuser
23 // (Tim) Cleaned up the code and added missing doxeygen style comments
24 //
25 // Revision 1.17 2006/02/10 20:58:07 cvsuser
26 // (Tim) Fixed a problem with updating optics information due to new sensim panel setup (asgFramewnd)
27 // Fixed a problem with creating default and new sensor panels (asgFramewnd)
28 // limited the m_detectorScale to keep the SenSim pbuffer within the imagers max Pbuffer limits (asgThread)
29 // fixed some tooltips in the scenario panel
30 // removed the fov from the optics panel, now uses the optics' sensor's fov
31 // added a file check to ciPanel to check if a filename entered is vaild, uesd the filecheck to make sure the user specified atmosphere always exists
32 // changed a new sensor to default to index of -1 so it doent interfere with the current sensor 0
33 //
34 // Revision 1.16 2006/01/13 21:14:10 cvsuser
35 // (Tim) Added the updateDoubleCell which reduces code in panels using grid controls and adds a check for the incoming data to make sure it is applicable
36 //
37 // Revision 1.15 2005/10/10 20:40:01 cvsuser
38 // (Tim) GUI property grid column amount and starting directory fixed
39 //
40 // Revision 1.14 2005/09/19 12:45:53 cvsuser
41 // Com Library additions
42 // Tom
43 //
44 // Revision 1.13 2005/05/02 16:12:06 cvsuser
45 // Removed slider bar from ciPanel, again.
46 //
47 // Nik
48 //
49 // Revision 1.12 2005/04/28 18:10:58 cvsuser
50 // Tom
51 // Added mouse manipulator controls to allow the user to adjust translation velocity and to copy sensor position to the sensor panel.
52 //
53 // Revision 1.11 2005/04/08 14:36:17 cvsuser
54 // Removed slider from ciPanel.
55 //
56 // Nik
57 //
58 // Revision 1.10 2005/03/18 22:59:27 cvsuser
59 // Tom
60 // Real-time HS Viewer mode added to Sensor panel
61 //
62 // Revision 1.9 2004/11/15 04:39:47 cvsuser
63 // *** empty log message ***
64 //
65 // Revision 1.8 2004/11/09 23:25:30 cvsuser
66 // Added "read only" runtime characteristics to sensor panel
67 //
68 // Nik
69 //
70 // Revision 1.7 2004/11/05 19:13:59 cvsuser
71 // Fixed ciDetectorPanel update problem
72 //
73 // Nik
74 //
75 // Revision 1.6 2004/11/03 17:17:15 cvsuser
76 // Added cicfg load
77 // fixed some panel bugs
78 // added panel grid assignement enumerations
79 //
80 // Nik
81 //
82 // Revision 1.5 2004/11/02 23:03:51 cvsuser
83 // added "upwards" messaging
84 // added initialization
85 //
86 // Nik
87 //
88 // Revision 1.4 2004/10/28 15:03:07 cvsuser
89 // added ciEntity data handling to ciEntityPanel
90 //
91 // Nik
92 //
93 // Revision 1.3 2004/10/22 14:55:22 cvsuser
94 // Renamed all ci methods to spec
95 //
96 // Nik
97 //
98 // Revision 1.2 2004/10/08 15:50:53 cvsuser
99 // implemented ciSensor in ciSensorPanel
100 //
101 // Nik
102 //
103 // Revision 1.1 2004/10/04 15:26:35 cvsuser
104 // Added generic ciPanel base class
105 //
106 // Nik
107 //
108 //
110 #ifndef _CIPANEL_H_
111 #define _CIPANEL_H_
112 
113 #if defined(__GNUG__) && !defined(__APPLE__)
114 #pragma interface "ciPanel.cpp"
115 #endif
116 
121 
122 #include "wx/grid.h"
124 #include <io.h>
125 #include "ciEvent.h"
126 //#include "ciGridEx.h"
127 //#include "ciGridCellCombobox.h"
128 
133 
134 class wxGrid;
136 class ciGridEx;
137 
142 
143 #define ID_DIALOG_BASE_PANEL 10000
144 #define SYMBOL_CIPANEL_STYLE wxRESIZE_BORDER
145 #define SYMBOL_CIPANEL_TITLE _("ciPanel")
146 #define SYMBOL_CIPANEL_IDNAME ID_DIALOG_BASE_PANEL
147 #define SYMBOL_CIPANEL_SIZE wxSize(400, 300)
148 #define SYMBOL_CIPANEL_POSITION wxDefaultPosition
149 #define ID_GRID 10001
150 
151 
152 // cell column definitions
153 
154 
155 
160 #ifndef wxCLOSE_BOX
161 #define wxCLOSE_BOX 0x1000
162 #endif
163 #ifndef wxFIXED_MINSIZE
164 #define wxFIXED_MINSIZE 0
165 #endif
166 
167 //DEFINE_LOCAL_EVENT_TYPE(ciPANEL_UPDATE_NAME)
168 
173 class ciPanel: public wxPanel
174 {
175  DECLARE_DYNAMIC_CLASS( ciPanel )
176  DECLARE_EVENT_TABLE()
177 
178 public:
179 
181 // enumGridColumnAssignments
187  {
188  NAME = 0,
190  };
191 
192 
194 //ciPanel
198  ciPanel( );
199 
201 //ciPanel
211  ciPanel(wxWindow* parent,
212  wxEvtHandler *appEvtHandler = NULL,
213  wxWindowID id = SYMBOL_CIPANEL_IDNAME,
214  const wxPoint& pos = SYMBOL_CIPANEL_POSITION,
215  const wxSize& size = SYMBOL_CIPANEL_SIZE,
216  long style = SYMBOL_CIPANEL_STYLE );
217 
218 
220 //Create
230  bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CIPANEL_IDNAME, const wxPoint& pos = SYMBOL_CIPANEL_POSITION, const wxSize& size = SYMBOL_CIPANEL_SIZE, long style = SYMBOL_CIPANEL_STYLE );
231 
232 
234 //CreateControls
239  void CreateControls(int gridColumns);
240 
241 
243 //CreateControlsWithSlider
247 // void CreateControlsWithSlider();
248 
250 
251 
253 //OnSize
258  void OnSize( wxSizeEvent& event );
259 
260 
262 //OnGridColSize
267  void OnGridColSize( wxGridSizeEvent& event );
268 
269 
271 //OnOffsetSliderUpdated
276  void OnOffsetSliderUpdated( wxCommandEvent& event );
277 
279 
281 
282 
284 //GetBitmapResource
290  wxBitmap GetBitmapResource( const wxString& name );
291 
292 
294 //GetIconResource
300  wxIcon GetIconResource( const wxString& name );
302 
303 
305 //ShowToolTips
310  static bool ShowToolTips();
311 
314  wxSlider* m_sliderOffset;
316 
318 // RuntimeSetup
330  virtual void RuntimeSetup(bool readOnly = true);
331 
332 
334 // updatePanel
342  virtual void updatePanel();
343 
344 
346 // updatePanel
355  virtual void initializePanel();
356 
358 // updateName
366  virtual void updateName(char *name);
367 
368 protected: // methods
369 
371 // updateCheckboxCell
381  virtual void updateCheckboxCell(int row, int col, bool check);
382 
383 
385 // getCheckboxCell
394  virtual bool getCheckboxCell(int row, int col);
395 
397 // updateDoubleCell
410  virtual double updateDoubleCell(int row, int col, double value, double upper = 1000000, double lower = -10000);
411 
413 //validFileCheck
420  virtual bool validFileCheck(char* fileName, char* fileType);
421 
423 // getDoubleCell
432  virtual double getDoubleCell(int row, int col);
433 
434 
436 // getSampleChoiceHandler
446 
448 // getSampleChoiceHandler
458  void setSampleChoiceHandler(int sel);
459 
460 
461 protected: // variables
462 
463  const int m_nameColWidth;// = 125;
464  wxEvtHandler *m_AppEvtHandler;
466 private: // variables
467 
468 
469 };
470 
471 #endif
472  // _CIPANEL_H_


Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)