Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

time_control.h

Go to the documentation of this file.
      00001 //----------------------------------------------------------------------------------------
      00011 // RCS-ID:      $Id: time_control.h,v 1.1 2002/09/27 13:24:11 robertoconnor Exp $
      00012 //----------------------------------------------------------------------------------------
      00013 
      00014 //----------------------------------------------------------------------------------------
      00015 // Begin single inclusion of this .h file condition
      00016 //----------------------------------------------------------------------------------------
      00017 
      00018 #ifndef _TIME_CONTROL_H_
      00019 #define _TIME_CONTROL_H_
      00020 
      00021 //----------------------------------------------------------------------------------------
      00022 // GCC interface
      00023 //----------------------------------------------------------------------------------------
      00024 
      00025 #if defined(__GNUG__) && ! defined(__APPLE__)
      00026     #pragma interface "time_control.h"
      00027 #endif
      00028 
      00029 //----------------------------------------------------------------------------------------
      00030 // Shared defines
      00031 //----------------------------------------------------------------------------------------
      00032 
      00033 #include "plucker_defines.h"
      00034 
      00035 //----------------------------------------------------------------------------------------
      00036 // Headers
      00037 //----------------------------------------------------------------------------------------
      00038 
      00039 #include "wx/panel.h"
      00040 #include "wx/datetime.h"
      00041 #include "wx/spinbutt.h"
      00042 
      00043 //----------------------------------------------------------------------------------------
      00044 // Class definition: time_control
      00045 //----------------------------------------------------------------------------------------
      00046 
      00048 class time_control : public wxPanel
      00049 {
      00050 
      00051 public:
      00052 
      00053     DECLARE_DYNAMIC_CLASS( time_control )
      00054 
      00055 public:
      00056 
      00058 
      00067     time_control( wxWindow *parent,
      00068                   wxWindowID id = -1,
      00069                   const wxPoint &pos = wxDefaultPosition,
      00070                   const wxSize &size = wxDefaultSize,
      00071                   const wxString &name = "the_time_control" );
      00072 
      00073     // Unused constructor: solely for usage of RTTI (DYNAMIC_CLASS) macros.
      00074     time_control() {};
      00075 
      00077     ~time_control();
      00078 
      00079     wxDateTime               get_time();
      00080     wxDateTime::wxDateTime_t get_hour();
      00081     wxDateTime::wxDateTime_t get_minute();
      00082 
      00083     void        set_time( const wxDateTime& input_time );
      00084     void        set_hour( const wxDateTime::wxDateTime_t input_hour );
      00085     void        set_minute( const wxDateTime::wxDateTime_t input_minute );
      00086 
      00087     void        enable ( bool do_enable );
      00088 
      00089 private:
      00090 
      00091     void        on_hour_textctrl( wxCommandEvent& event );
      00092     void        on_hour_spinbutton( wxSpinEvent& event );
      00093     void        on_minute_textctrl( wxCommandEvent& event );
      00094     void        on_minute_spinbutton( wxSpinEvent& event );
      00095 
      00096     wxTextCtrl*   m_hour_textctrl;
      00097     wxSpinButton* m_hour_spinbutton;
      00098     wxStaticText* m_colon_statictext;
      00099     wxTextCtrl*   m_minute_textctrl;
      00100     wxSpinButton* m_minute_spinbutton;
      00101 
      00102     DECLARE_EVENT_TABLE()
      00103 
      00104 };
      00105 
      00106 //----------------------------------------------------------------------------------------
      00107 // End single inclusion of this .h file condition
      00108 //----------------------------------------------------------------------------------------
      00109 
      00110 #endif  //_TIME_CONTROL_H_