]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/os2/statline.h
Remove wxRTTI macro for wxComboBox from Motif port.
[wxWidgets.git] / include / wx / os2 / statline.h
index 0b4b2d8341a11157559bed359ddfe38d77cab9a4..5cddf0fc596c9e9a94a665eb5ea1e393547ab9be 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        msw/statline.h
+// Name:        wx/os2/statline.h
 // Purpose:     MSW version of wxStaticLine class
 // Author:      Vadim Zeitlin
 // Created:     28.06.99
 // Purpose:     MSW version of wxStaticLine class
 // Author:      Vadim Zeitlin
 // Created:     28.06.99
@@ -8,43 +8,79 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifndef _WX_MSW_STATLINE_H_
-#define _WX_MSW_STATLINE_H_
-
-#ifdef __GNUG__
-    #pragma interface
-#endif
+#ifndef _WX_OS2_STATLINE_H_
+#define _WX_OS2_STATLINE_H_
 
 // ----------------------------------------------------------------------------
 // wxStaticLine
 // ----------------------------------------------------------------------------
 
 
 // ----------------------------------------------------------------------------
 // wxStaticLine
 // ----------------------------------------------------------------------------
 
-class WXDLLEXPORT wxStaticLine : public wxStaticLineBase
+class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase
 {
 {
-    DECLARE_DYNAMIC_CLASS(wxStaticLine)
 
 public:
     // constructors and pseudo-constructors
     wxStaticLine() { }
 
 public:
     // constructors and pseudo-constructors
     wxStaticLine() { }
+    wxStaticLine( wxWindow*       pParent
+                 ,wxWindowID      vId = wxID_ANY
+                 ,const wxPoint&  rPos = wxDefaultPosition
+                 ,const wxSize&   rSize = wxDefaultSize
+                 ,long            lStyle = wxLI_HORIZONTAL
+                 ,const wxString& rsName = wxStaticLineNameStr
+                )
+    {
+        Create(pParent, vId, rPos, rSize, lStyle, rsName);
+    }
+
+    bool Create(  wxWindow*       pParent
+                 ,wxWindowID      vId = wxID_ANY
+                 ,const wxPoint&  rPos = wxDefaultPosition
+                 ,const wxSize&   rSize = wxDefaultSize
+                 ,long            lStyle = wxLI_HORIZONTAL
+                 ,const wxString& rsName = wxStaticLineNameStr
+                );
+
+    inline bool          IsVertical(void) const { return((GetWindowStyleFlag() & wxLI_VERTICAL) != 0); }
+    inline static int    GetDefaultSize(void) { return 2; }
 
 
-    wxStaticLine( wxWindow *parent,
-                  wxWindowID id,
-                  const wxPoint &pos = wxDefaultPosition,
-                  const wxSize &size = wxDefaultSize,
-                  long style = wxLI_HORIZONTAL,
-                  const wxString &name = wxStaticTextNameStr )
+    //
+    // Overridden base class virtuals
+    //
+    inline virtual bool AcceptsFocus(void) const {return FALSE;}
+
+protected:
+    inline wxSize AdjustSize(const wxSize& rSize) const
     {
     {
-        Create(parent, id, pos, size, style, name);
+        wxSize                      vSizeReal( rSize.x
+                                              ,rSize.y
+                                             );
+
+        if (IsVertical())
+        {
+            if (rSize.x == -1 )
+                vSizeReal.x = GetDefaultSize();
+        }
+        else
+        {
+            if (rSize.y == -1)
+                vSizeReal.y = GetDefaultSize();
+        }
+        return vSizeReal;
     }
 
     }
 
-    bool Create( wxWindow *parent,
-                 wxWindowID id,
-                 const wxPoint &pos = wxDefaultPosition,
-                 const wxSize &size = wxDefaultSize,
-                 long style = wxLI_HORIZONTAL,
-                 const wxString &name = wxStaticTextNameStr );
-};
+    inline wxSize DoGetBestSize(void) const { return (AdjustSize(wxDefaultSize)); }
+
+    //
+    // Usually overridden base class virtuals
+    //
+    virtual WXDWORD OS2GetStyle( long     lStyle
+                                ,WXDWORD* pdwExstyle
+                               ) const;
+
+private:
+    DECLARE_DYNAMIC_CLASS(wxStaticLine)
+}; // end of CLASS wxStaticLine
 
 
-#endif // _WX_MSW_STATLINE_H_
+#endif // _WX_OS2_STATLINE_H_