]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/os2/slider.h
Set initial window size as its minimal size.
[wxWidgets.git] / include / wx / os2 / slider.h
index 66b9b282be16078134b73b2d0ba047dfe745f286..9fc369c7e5e3510d26e7b8d1cdc0d662a01aeced 100644 (file)
 
 #include "wx/control.h"
 
 
 #include "wx/control.h"
 
-WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
-
 // Slider
 // Slider
-class WXDLLEXPORT wxSlider: public wxSliderBase
+class WXDLLIMPEXP_CORE wxSlider: public wxSliderBase
 {
 public:
   wxSlider();
 {
 public:
   wxSlider();
@@ -29,9 +27,7 @@ public:
                   ,const wxPoint&     rPos = wxDefaultPosition
                   ,const wxSize&      rSize = wxDefaultSize
                   ,long               lStyle = wxSL_HORIZONTAL
                   ,const wxPoint&     rPos = wxDefaultPosition
                   ,const wxSize&      rSize = wxDefaultSize
                   ,long               lStyle = wxSL_HORIZONTAL
-#if wxUSE_VALIDATORS
                   ,const wxValidator& rValidator = wxDefaultValidator
                   ,const wxValidator& rValidator = wxDefaultValidator
-#endif
                   ,const wxString&    rsName = wxSliderNameStr
                  )
     {
                   ,const wxString&    rsName = wxSliderNameStr
                  )
     {
@@ -43,13 +39,11 @@ public:
                ,rPos
                ,rSize
                ,lStyle
                ,rPos
                ,rSize
                ,lStyle
-#if wxUSE_VALIDATORS
                ,rValidator
                ,rValidator
-#endif
                ,rsName
               );
     }
                ,rsName
               );
     }
-    ~wxSlider();
+    virtual ~wxSlider();
 
     bool Create( wxWindow*          pParent
                 ,wxWindowID         vId
 
     bool Create( wxWindow*          pParent
                 ,wxWindowID         vId
@@ -59,9 +53,7 @@ public:
                 ,const wxPoint&     rPos = wxDefaultPosition
                 ,const wxSize&      rSize = wxDefaultSize
                 ,long               lStyle = wxSL_HORIZONTAL
                 ,const wxPoint&     rPos = wxDefaultPosition
                 ,const wxSize&      rSize = wxDefaultSize
                 ,long               lStyle = wxSL_HORIZONTAL
-#if wxUSE_VALIDATORS
                 ,const wxValidator& rValidator = wxDefaultValidator
                 ,const wxValidator& rValidator = wxDefaultValidator
-#endif
                 ,const wxString&    rsName = wxSliderNameStr
                );
 
                 ,const wxString&    rsName = wxSliderNameStr
                );
 
@@ -74,7 +66,7 @@ public:
                  void GetPosition( int* pnX
                                   ,int* pnY
                                  ) const ;
                  void GetPosition( int* pnX
                                   ,int* pnY
                                  ) const ;
-                 bool Show(bool bShow);
+                 bool Show(bool bShow = TRUE);
                  void SetRange( int nMinValue
                                ,int nMaxValue
                               );
                  void SetRange( int nMinValue
                                ,int nMaxValue
                               );
@@ -113,6 +105,13 @@ public:
     inline         WXHWND   GetStaticMax(void) const { return m_hStaticMax; }
     inline         WXHWND   GetEditValue(void) const { return m_hStaticValue; }
            virtual bool     ContainsHWND(WXHWND hWnd) const;
     inline         WXHWND   GetStaticMax(void) const { return m_hStaticMax; }
     inline         WXHWND   GetEditValue(void) const { return m_hStaticValue; }
            virtual bool     ContainsHWND(WXHWND hWnd) const;
+                   void     AdjustSubControls( int  nX
+                                              ,int  nY
+                                              ,int  nWidth
+                                              ,int  nHeight
+                                              ,int  nSizeFlags
+                                             );
+    inline         int      GetSizeFlags(void) { return m_nSizeFlags; }
                    void     Command(wxCommandEvent& rEvent);
            virtual WXHBRUSH OnCtlColor( WXHDC    hDC
                                        ,WXHWND   hWnd
                    void     Command(wxCommandEvent& rEvent);
            virtual WXHBRUSH OnCtlColor( WXHDC    hDC
                                        ,WXHWND   hWnd
@@ -138,7 +137,11 @@ protected:
     int                             m_nTickFreq;
     double                          m_dPixelToRange;
     int                             m_nThumbLength;
     int                             m_nTickFreq;
     double                          m_dPixelToRange;
     int                             m_nThumbLength;
+    int                             m_nSizeFlags;
 
 
+    virtual void DoGetSize( int* pnWidth
+                           ,int* pnHeight
+                          ) const;
     virtual void DoSetSize( int  nX
                            ,int  nY
                            ,int  nWidth
     virtual void DoSetSize( int  nX
                            ,int  nY
                            ,int  nWidth