Main Page   Class Hierarchy   Compound List   File List   Compound Members  

insdlg.h

00001 
00002 
00003 /*
00004  * Definition of class for dialog to insert a new layer.
00005 */
00006 
00007 #ifndef INSDLG_H
00008 #define INSDLG_H
00009 
00010 #ifdef __GNUG__
00011 #pragma interface
00012 #endif
00013 
00014 #include "chandbas.h"
00015 #include "wx/minifram.h"
00016 #include "wx/grid.h"
00017 
00020 
00021 //:defenition
00025 
00026 class InsLayer: public wxMiniFrame
00027 {
00028         public:
00029 
00030                 // Constructor
00031                 InsLayer(GDSMainWindow* parent,char* title,long style = 0 ,char* name = "insert_layer_dlg");
00032 
00033                 // Destructor
00034                 ~InsLayer();
00035 
00036       // Windows initialization.
00037                 void SetupWindow();
00038 
00039       // Gets selection and gives command "setlayer" to the commandhandler to set the current layer.
00040       void      CmListBox();
00041 
00042       // Close window if EXIT-button is pressed.
00043       void      OnCloseWindow(wxCloseEvent& event);
00044 
00045       void OnLabelLeftClick(wxGridEvent& ev );
00046       void OnSelectCell(wxGridEvent& ev );
00047 //      void OnCellValueChanged(wxGridEvent& ev );
00048 //      void OnCellLeftClick(wxGridEvent& ev );
00049 
00050         protected:
00051                 void                     Update();
00052 
00053                 // Pointer to mainwindow.
00054                 GDSMainWindow*  _parent;
00055 
00056                 // wxWindows class.
00057                 wxPanel*                _panel1;
00058 
00059       //wxWindows class.
00060                 wxGrid*    m_grid;
00061 
00062       // Declare used events.
00063       DECLARE_EVENT_TABLE()
00064 };
00065 
00066 class MyBoolEdit : public wxGridCellBoolEditor
00067 {
00068 public:
00069     void BeginEdit(int row, int col, wxGrid* grid);
00070     bool EndEdit(int row, int col, wxGrid* grid);
00071     void StartingClick();
00072     void Create(wxWindow* parent,wxWindowID id,wxEvtHandler* evtHandler);
00073 
00074     int m_row;
00075     int m_col;
00076 };
00077 
00078 class MyCheckBox : public wxCheckBox
00079 {
00080 public:
00081       MyCheckBox(wxWindow *parent,
00082                         wxWindowID id,
00083                         const wxString& label,
00084                         const wxPoint& pos,
00085                         const wxSize& size, long style , MyBoolEdit* edit
00086                  );
00087       void MyCheckBox::OnMouseEvent(wxMouseEvent& event);
00088       DECLARE_EVENT_TABLE()
00089       MyBoolEdit* m_edit;
00090 };
00091 
00092 #endif
insdlg.h Source File -- Thu Nov 28 21:24:56 2002 -- 28 Nov 2002 -- 1.2.18 -- -- . -- Main Page