mainwin.h Source File

Main Page Class Hierarchy Compound List File List Compound Members

# mainwin.h

    00001 #ifndef _MAINWIN_H
    00002 #define _MAINWIN_H
    00003
    00004 #ifdef __GNUG__
    00005 #pragma interface
    00006 #endif
    00007
    00008 #define SLIDEMARGE            50
    00009 #define MAX_FILES                                       5
    00010
    00011 #include "wxwin.h"
    00012 #include "wx/print.h"
    00013 #include "alias.h"
    00014 #include "_lnk_itr.h"
    00015
    00016 class           Win_CommandHandler; // the commandhandler
    00017 class           WindowsDriver;            // the windows driver
    00018 class   WinStatusBar;
    00019 class           About;
    00020 class           ExecDlg;
    00021 class           DebugDialog;
    00022 class           StopDialog;
    00023 class           InsLayer;
    00024 class           DistanceDlg;
    00025 class           IdentDlg;
    00026 class           Wait;
    00027 class           StructuresDialog;
    00028 class           GroupDialog;
    00029 class   LayerOrder;
    00030 class   LayerPropertiesDialog;
    00031 class           NewFileDialog;
    00032 class   PatternDialog;
    00033 class           Transformations;
    00034 class           CursorDialog;
    00035 class    SettingsDialog;
    00036 class           TextinsDialog;
    00037 class           Gridsettings;
    00038 class           Unitssettings;
    00039 class           Factors;
    00040 class           wxPrinter;
    00041 class           wxPrintout;
    00042 class           ButtonBar;
    00043
    00044
    00045 extern wxMenu   *file_menu;
    00046 extern bool     initialized;
    00047 enum ToolBarSet{ TOOLBAR_GENERAL,TOOLBAR_DRAW,TOOLBAR_NOCHANGE};
    00048 class GDSMainWindow : public wxFrame
    00049 {
    00050         public:
    00051                 GDSMainWindow(wxFrame *frame, char *title, int x, int y, int w, int h );
    00052                 ~GDSMainWindow();
    00053       void SetUpWindow();
    00054                 bool                                            InitToolbar();
    00055                 bool                                            SetToolbar(ToolBarSet a_toolbar_id);
    00056                 void                                            OnToolEnter(wxCommandEvent& event);
    00057                 void                                            OnToolLeftClick(wxCommandEvent& event);
    00058
    00059
    00060                 void                                            CmMenu(wxCommandEvent& event);
    00061
    00062       void                                              Exit();
    00063                 void                                            OnCloseWindow(void);
    00064                 void                                            OnSize(wxSizeEvent& event);
    00065                 void                                            Redraw();
    00066                 void                                            set_Cursor(char* type);
    00067                 void                                            GetClientWindowSize(int&, int&, int&, int&);
    00068                 void                                            ErrorMessage(char*, char*, int, int);
    00069                 void                                            Pause(const  wxString&);
    00070                 void                                            ViewCoordinates(bool);
    00071                 bool                                    UpdateHistoryMenu();
    00072                 void                                            MakeLower(char*);
    00073                 void                                            AskForFilename(const  wxString&);
    00074                 bool               AskFilename(const wxString&,const  wxString&,const  wxString&,const  wxString&, wxString&,const  wxString&);
    00075                 bool               Ask(const  wxString&, wxString&);
    00076                 void                                            ShowString(const  wxString& thestring);
    00077       void                                              ShowTrans(bool);
    00078       void                 ShowSettings();
    00079       void                                              ShowCursorDlg();
    00080       void                                              ShowTextDlg();
    00081                 void                                            ShowGroups();
    00082                 void                                            ShowFactors();
    00083                 void                                            ShowLayers();
    00084                 void                 ShowLayerOrder();
    00085                 void                                            ShowAlias(const  wxString& alias);
    00086                 void                                            ShowEnv(const  wxString& env);
    00087                 void                                            ShowHelp(const  wxString& help_on);
    00088                 void                                            ShowKeyBNF();
    00089                 void                                            ShowProcessBNF();
    00090                 void                                            ShowPathtypeDlg();
    00091                 void                                            ShowWidthDlg();
    00092       void                                              ShowNewFileDlg();
    00093                 wxMenuBar*                              SetupMenuBar();
    00094                 wxMenu*                                 _mousemenu;                                             // the floating menu
    00095       void                 ProcessArgs(char* type, char* filetoload, char* processfile, bool viewer );
    00096       void                          SetRelStart();
    00097       void                 CalcDistance();
    00098       void                                              SetPoint(double,double);
    00099                 void                                            SetBackGroundColor(long _back_colour);
    00100
    00101
    00102                 bool                                    GetCheckViewOutline();
    00103                 bool               GetCheckViewCoordinates();
    00104                 bool               GetCheckGridVisible();
    00105
    00106                 // the dialog screens (should be public so that callback functions can access them)
    00107                 About*                                          _aboutDialog;
    00108       DistanceDlg*                              _distDialog;
    00109       ExecDlg*                                          _execDialog;
    00110       DebugDialog*                              _debugerDialog;
    00111       StopDialog*                                  _stopDialog;
    00112       InsLayer*                                 _insertDialog;
    00113       IdentDlg*                                 _identDialog;
    00114                 Wait*                                                   _waitDialog;
    00115                 StructuresDialog*                       _structDialog;
    00116                 GroupDialog*                            _groupDialog;
    00117                 LayerOrder*                                     _layerorderDialog;
    00118                 Factors*                                                _factorsDialog;
    00119       Transformations*                  _transDialog;
    00120       CursorDialog*             _cursorDialog;
    00121       SettingsDialog*           _settingsDialog;
    00122       Gridsettings*                             _gridDialog;
    00123       Unitssettings*                            _unitsDialog;
    00124                 LayerPropertiesDialog*  _layerpropertiesDialog;
    00125       NewFileDialog*            _newfileDialog;
    00126       TextinsDialog*                            _textinsDialog;
    00127
    00128                 // command enable functions
    00129                 void                                            CmSelectedOnly();
    00130       void                 CmMakeStructure(bool named);
    00131                 void                                            CmShowGrid();
    00132       void                                              CmDestination();
    00133                 void                                            CmTransform();
    00134                 void                                            CmCalcArea();
    00135                 void                                            CmTransformA();
    00136                 void                 GDS_loaded(bool);
    00137                 void                 CmZoomOutEnable(bool);
    00138                 void                 CmDistanceEnable(bool);
    00139                 void                                            Operation(char*);
    00140
    00141                 void                                            CmShowGridSettings();
    00142                 void                                            CmShowUnitsSettings();
    00143
    00144                 void                                            ShowDistDlg();
    00145                 void                                            ShowExecDlg();
    00146                 void                                            ShowIdentDlg();
    00147       void                                              ShowInsertLayerDlg();
    00148       void                                              CmShowNewfileDialog();
    00149       void                                              CmProperty(bool atlayer);
    00150
    00151                 // event handler functions
    00152                 void                                            CmUndo();
    00153                 void                                            CmCancel();
    00154                 void                                            CmZoomOut();
    00155                 void                                            CmZoomOut2();
    00156                 void                                            CmZoomBack();
    00157                 void                                            CmViewStructure();
    00158                 void                 CmFileOpen();
    00159                 void                 CmFileOpenGDS();
    00160                 void                 CmFileOpenKEY();
    00161                 void                 CmFileOpenFLASH();
    00162                 void                 CmFileOpenEMASK();
    00163                 void                                            CmFilePrint();
    00164                 void                                            CmFileQuit();
    00165                 void                 CmOpenOldFile(wxCommandEvent& event);
    00166                 void                 CmFileClose();
    00167                 void                 CmLoadSetup();
    00168                 void                 CmSaveSetup();
    00169                 void                 CmFileSaveGDS();
    00170                 void                 CmFileSaveKEY();
    00171       void                 CmFileSaveSVG();
    00172                 void                 CmFileSaveFLASH();
    00173                 void                 CmFileSaveEMASK();
    00174                 void                 CmFileSaveCNC();
    00175                 void                 CmFileSaveGBR();
    00176                 void                 CmFileSave();
    00177                 void                 CmFileSaveAs();
    00178                 void                 CmFilePNG();
    00179                 void                 CmFileBMP();
    00180                 void                                            SavePNG(const char* filename);
    00181                 void                                            SaveBMP(const char* filename);
    00182                 void                 CmFileImportGDS();
    00183                 void                 CmFileImportKEY();
    00184                 void                 CmFileImportFLASH();
    00185                 void                 CmFileImportEMASK();
    00186                 void                 CmFilePrintSetup();
    00187                 void                 CmRecord();
    00188                 void                 CmStepMode(bool onoff);
    00189                 void                 CmLoadProces();
    00190                 void                 CmViewCoordinates();
    00191                 void                 CmViewWireFrame();
    00192       void                                              CmVisibleOnly();
    00193       void                                              CmSaveSetupOnExit();
    00194                 void                 CmHelpAbout();
    00195       void                 CmHelp();
    00196                 void                 CmContextHelp();
    00197                 void                                            ShowWaitDialog(const char* message);
    00198       void                 CmRegisterApplication();
    00199                 void                                            OnIdle(wxIdleEvent& event);
    00200       bool                                      _exit;                     //exit the application
    00201                 int                                             _printing;                                              // boolean when printing
    00202
    00203 private:
    00204
    00205                 bool                                    IsFile(char*);
    00206       bool                                      _execDlgVisible;
    00207       bool                                      _insertDlgVisible;
    00208       bool                                      _distDlgVisible;
    00209       bool                                      _identDlgVisible;
    00210                 wxCursor                                        _cursorWait;
    00211                 wxCursor                                        _cursorArrow;
    00212                 wxCursor                                        _cursorHelp;
    00213                 wxPen*                                  _zoom_pen;                                              // zoom rectangle style
    00214                 ButtonBar*                              _buttonbar;
    00215                 wxPrinter*                              _printer;
    00216                 wxPrintout*                             _printout;
    00217                 wxDC*                                           _dragDC;                                                        // Device context for zooming (was clientDC)
    00218                 wxRect                                          _ZoomRect;                                              // zoom rectangle
    00219                 WinStatusBar*                   _winstatusbar;
    00220                 int                                             _nbLoadedFiles;                         // for file-history
    00221       double                               _point_x;                  // Set point of rightmouse button
    00222       double                          _point_y;
    00223
    00224                 ToolBarSet                              m_current_toolbar_id;
    00225       wxToolBar*           m_toolbar1;
    00226       wxToolBar*           m_toolbar2;
    00227       wxFrame*             m_dummyFrame;
    00228       DECLARE_EVENT_TABLE()
    00229
    00230 };
    00231
    00232 #endif
    00233
    00234

mainwin.h Source File -- Thu Nov 28 21:24:56 2002 -- 28 Nov 2002 -- 1.2.18 -- -- . -- Main Page