statline.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: statline.h
  3. // Purpose: interface of wxStaticLine
  4. // Author: wxWidgets team
  5. // Licence: wxWindows licence
  6. /////////////////////////////////////////////////////////////////////////////
  7. /**
  8. @class wxStaticLine
  9. A static line is just a line which may be used in a dialog to separate the
  10. groups of controls.
  11. The line may be only vertical or horizontal. Moreover, not all ports
  12. (notably not wxGTK) support specifying the transversal direction of the
  13. line (e.g. height for a horizontal line) so for maximal portability you
  14. should specify it as wxDefaultCoord.
  15. @beginStyleTable
  16. @style{wxLI_HORIZONTAL}
  17. Creates a horizontal line.
  18. @style{wxLI_VERTICAL}
  19. Creates a vertical line.
  20. @endStyleTable
  21. @library{wxcore}
  22. @category{ctrl}
  23. @see wxStaticBox
  24. */
  25. class wxStaticLine : public wxControl
  26. {
  27. public:
  28. /**
  29. Default constructor
  30. */
  31. wxStaticLine();
  32. /**
  33. Constructor, creating and showing a static line.
  34. @param parent
  35. Parent window. Must not be @NULL.
  36. @param id
  37. Window identifier. The value wxID_ANY indicates a default value.
  38. @param pos
  39. Window position.
  40. If ::wxDefaultPosition is specified then a default position is chosen.
  41. @param size
  42. Size. Note that either the height or the width (depending on
  43. whether the line if horizontal or vertical) is ignored.
  44. @param style
  45. Window style (either wxLI_HORIZONTAL or wxLI_VERTICAL).
  46. @param name
  47. Window name.
  48. @see Create()
  49. */
  50. wxStaticLine(wxWindow* parent, wxWindowID id = wxID_ANY,
  51. const wxPoint& pos = wxDefaultPosition,
  52. const wxSize& size = wxDefaultSize,
  53. long style = wxLI_HORIZONTAL,
  54. const wxString& name = wxStaticLineNameStr);
  55. /**
  56. Creates the static line for two-step construction.
  57. See wxStaticLine() for further details.
  58. */
  59. bool Create(wxWindow* parent, wxWindowID id = wxID_ANY,
  60. const wxPoint& pos = wxDefaultPosition,
  61. const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL,
  62. const wxString& name = wxStaticLineNameStr);
  63. /**
  64. This static function returns the size which will be given to the smaller
  65. dimension of the static line, i.e. its height for a horizontal line or its
  66. width for a vertical one.
  67. */
  68. static int GetDefaultSize();
  69. /**
  70. Returns @true if the line is vertical, @false if horizontal.
  71. */
  72. bool IsVertical() const;
  73. };