Main Page   Class Hierarchy   Compound List   File List   Compound Members  

textinsdlg.h

00001 
00002 
00003 /*
00004  * Definitions of classes for dialog to insert/edit text
00005 */
00006 
00007 #ifndef TEXTINSDLG_H
00008 #define TEXTINSDLG_H
00009 
00010 #ifdef __GNUG__
00011 #pragma interface
00012 #endif
00013 
00016 
00017 //:defenition
00022 class TextinsDialog: public wxDialog
00023 {
00024         public:
00025 
00026         //constructor.
00027                 TextinsDialog(GDSMainWindow* parent);
00028 
00029       // Windows initialization.
00030       void                              SetupWindow();
00031 
00032       void                              ChooseFont(wxCommandEvent& WXUNUSED(event));
00033 
00034       // Close window if OK-button is pressed.
00035       void                              CmOk(wxEvent& event);
00036 
00037       // Close window if EXIT-button is pressed.
00038       void                              OnCloseWindow(wxCloseEvent& event);
00039 
00040       // Set a selected textvalue in edit-/inserttext dialog.
00041       void                              SetText(const wxString&);
00042 
00043       // Set heightvalue in edit-/inserttext dialog, the heightsetting depends on the unitsetting.
00045       void                              SetHeight(double the_height);
00046 
00047       // Set unitvalue in edit-/inserttext dialog, this value will also be copied into the string "_units",
00048       // which is described earlier.
00050       void                              SetUnit(const wxString& buf);
00051 
00052       // Get and return selected unitvalue from edit-/inserttext dialog, this value will be copied into
00053       // the string "_units", which is described earlier.
00054       wxString                  GetUnit();
00055 
00056       // Get and return textvalue from edit-/inserttext dialog.
00057       wxString                  GetText();
00058 
00059       // Get heightvalue and unitssetting from edit-/inserttext dialog and return heightvalue depending on
00060       // chosen unitsetting.
00061       double         GetHeight();
00062 
00063    #if defined(__WXMSW__) && wxTEST_GENERIC_DIALOGS_IN_MSW
00064       void ChooseFontGeneric(wxCommandEvent& WXUNUSED(event) );
00065    #endif
00066 
00067         protected:
00068 
00069         // Pointer to mainwindow.
00070         GDSMainWindow*          _parent;
00071 
00072       // string which contains textvalue.
00073       wxString          _text;
00074 
00075       // string which contains unitsetting.
00076       wxString          _units;
00077 
00078                 // wxWindows class.
00079                 wxPanel*                                _panel;
00080 
00081       // wxWindows class.
00082       wxStaticBox*      _textbox;
00083 
00084       // wxWindows class.
00085       wxStaticBox*      _heightbox;
00086 
00087       // wxWindows class.
00088       wxTextCtrl*                       _text_insert;
00089 
00090       // wxWindows class.
00091       wxTextCtrl*                       _text_height;
00092 
00093       // wxWindows class.
00094       wxChoice*         _text_units;
00095 
00096       //wxWindows class.
00097       wxButton*                 _font_button;
00098 
00099       //wxWindows class.
00100       wxButton*                 _font_generic;
00101 
00102       // wxWindows class.
00103       wxButton*         _ok;
00104 
00105       // wxWindows class.
00106       wxButton*                 _cancel;
00107 
00108       wxFont*                           _font;
00109 
00110       // wxWindows class.
00111       wxString                  _choices[9];
00112 
00113       // wxWindows class.
00114       double                                    _width;
00115 
00116       // wxWindows class.
00117       wxFont                            _text_font;
00118 
00119       // wxWindows class.
00120       wxColour                  _text_colour;
00121 
00122       // Declare used events.
00123       DECLARE_EVENT_TABLE()
00124 };
00125 
00126 #endif
textinsdlg.h Source File -- Thu Nov 28 21:24:56 2002 -- 28 Nov 2002 -- 1.2.18 -- -- . -- Main Page