1 ///////////////////////////////////////////////////////////////////////////// 
   3 // Purpose:     wxStaticLine class interface 
   4 // Author:      Vadim Zeitlin 
   7 // Copyright:   (c) 1999 Vadim Zeitlin 
   8 // Licence:     wxWindows licence 
   9 ///////////////////////////////////////////////////////////////////////////// 
  11 #ifndef _WX_STATLINE_H_BASE_ 
  12 #define _WX_STATLINE_H_BASE_ 
  14 // ---------------------------------------------------------------------------- 
  16 // ---------------------------------------------------------------------------- 
  18 // this defines wxUSE_STATLINE 
  23 // the base class declaration 
  24 #include "wx/control.h" 
  26 // ---------------------------------------------------------------------------- 
  28 // ---------------------------------------------------------------------------- 
  30 // the default name for objects of class wxStaticLine 
  31 extern WXDLLEXPORT_DATA(const wxChar
) wxStaticTextNameStr
[]; 
  33 // ---------------------------------------------------------------------------- 
  34 // wxStaticLine - a line in a dialog 
  35 // ---------------------------------------------------------------------------- 
  37 class WXDLLEXPORT wxStaticLineBase 
: public wxControl
 
  41     wxStaticLineBase() { } 
  43     // is the line vertical? 
  44     bool IsVertical() const { return (GetWindowStyle() & wxLI_VERTICAL
) != 0; } 
  46     // get the default size for the "lesser" dimension of the static line 
  47     static int GetDefaultSize() { return 2; } 
  49     // overriden base class virtuals 
  50     virtual bool AcceptsFocus() const { return false; } 
  53     // set the right size for the right dimension 
  54     wxSize 
AdjustSize(const wxSize
& size
) const 
  56         wxSize 
sizeReal(size
); 
  59             if ( size
.x 
== wxDefaultCoord 
) 
  60                 sizeReal
.x 
= GetDefaultSize(); 
  64             if ( size
.y 
== wxDefaultCoord 
) 
  65                 sizeReal
.y 
= GetDefaultSize(); 
  71     virtual wxSize 
DoGetBestSize() const 
  73         return AdjustSize(wxDefaultSize
); 
  76     DECLARE_NO_COPY_CLASS(wxStaticLineBase
) 
  79 // ---------------------------------------------------------------------------- 
  80 // now include the actual class declaration 
  81 // ---------------------------------------------------------------------------- 
  83 #if defined(__WXUNIVERSAL__) 
  84     #include "wx/univ/statline.h" 
  85 #elif defined(__WXMSW__) 
  86     #include "wx/msw/statline.h" 
  87 #elif defined(__WXGTK20__) 
  88     #include "wx/gtk/statline.h" 
  89 #elif defined(__WXGTK__) 
  90     #include "wx/gtk1/statline.h" 
  91 #elif defined(__WXPM__) 
  92     #include "wx/os2/statline.h" 
  93 #elif defined(__WXMAC__) 
  94     #include "wx/mac/statline.h" 
  95 #elif defined(__WXCOCOA__) 
  96     #include "wx/cocoa/statline.h" 
  97 #else // use generic implementation for all other platforms 
  98     #include "wx/generic/statline.h" 
 101 #endif // wxUSE_STATLINE 
 104     // _WX_STATLINE_H_BASE_