1//--------------------------------------------------------------------------- 2// This file is generated by wxPython's SIP generator. Do not edit by hand. 3// 4// Copyright: (c) 2018 by Total Control Software 5// License: wxWindows License 6// 7// This file will be included by _core.sip 8// 9//--------------------------------------------------------------------------- 10 11//--------------------------------------------------------------------------- 12 13const char* wxScrollBarNameStr; 14 15class wxScrollBar : wxControl 16{ 17 %Docstring 18 ScrollBar() 19 ScrollBar(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=SB_HORIZONTAL, validator=DefaultValidator, name=ScrollBarNameStr) 20 21 A wxScrollBar is a control that represents a horizontal or vertical 22 scrollbar. 23 %End 24 %TypeHeaderCode 25 #include <wx/scrolbar.h> 26 %End 27 28public: 29 wxScrollBar(); 30 %PreMethodCode 31 if (!wxPyCheckForApp()) return NULL; 32 %End 33 34 wxScrollBar( 35 wxWindow * parent /TransferThis/, 36 wxWindowID id = wxID_ANY, 37 const wxPoint & pos = wxDefaultPosition, 38 const wxSize & size = wxDefaultSize, 39 long style = wxSB_HORIZONTAL, 40 const wxValidator & validator = wxDefaultValidator, 41 const wxString & name = wxScrollBarNameStr 42 ); 43 %PreMethodCode 44 if (!wxPyCheckForApp()) return NULL; 45 %End 46 47 ~wxScrollBar(); 48 49 bool Create( 50 wxWindow * parent /TransferThis/, 51 wxWindowID id = wxID_ANY, 52 const wxPoint & pos = wxDefaultPosition, 53 const wxSize & size = wxDefaultSize, 54 long style = wxSB_HORIZONTAL, 55 const wxValidator & validator = wxDefaultValidator, 56 const wxString & name = wxScrollBarNameStr 57 ); 58 %Docstring 59 Create(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=SB_HORIZONTAL, validator=DefaultValidator, name=ScrollBarNameStr) -> bool 60 61 Scrollbar creation function called by the scrollbar constructor. 62 %End 63 64 int GetPageSize() const; 65 %Docstring 66 GetPageSize() -> int 67 68 Returns the page size of the scrollbar. 69 %End 70 71 int GetRange() const; 72 %Docstring 73 GetRange() -> int 74 75 Returns the length of the scrollbar. 76 %End 77 78 int GetThumbPosition() const; 79 %Docstring 80 GetThumbPosition() -> int 81 82 Returns the current position of the scrollbar thumb. 83 %End 84 85 int GetThumbSize() const; 86 %Docstring 87 GetThumbSize() -> int 88 89 Returns the thumb or 'view' size. 90 %End 91 92 void SetScrollbar( 93 int position, 94 int thumbSize, 95 int range, 96 int pageSize, 97 bool refresh = true 98 ); 99 %Docstring 100 SetScrollbar(position, thumbSize, range, pageSize, refresh=True) 101 102 Sets the scrollbar properties. 103 %End 104 105 void SetThumbPosition( 106 int viewStart 107 ); 108 %Docstring 109 SetThumbPosition(viewStart) 110 111 Sets the position of the scrollbar. 112 %End 113 114 bool IsVertical() const; 115 %Docstring 116 IsVertical() -> bool 117 118 Returns true for scrollbars that have the vertical style set. 119 %End 120 121 public: 122 virtual wxPoint GetClientAreaOrigin() const; 123 virtual bool Validate(); 124 virtual bool TransferDataToWindow(); 125 virtual bool TransferDataFromWindow(); 126 virtual void InitDialog(); 127 virtual bool AcceptsFocus() const; 128 virtual bool AcceptsFocusRecursively() const; 129 virtual bool AcceptsFocusFromKeyboard() const; 130 virtual void AddChild( wxWindowBase *child ); 131 virtual void RemoveChild( wxWindowBase *child ); 132 virtual void InheritAttributes(); 133 virtual bool ShouldInheritColours() const; 134 virtual void OnInternalIdle(); 135 virtual wxWindow *GetMainWindowOfCompositeControl(); 136 virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); 137 virtual void SetCanFocus(bool canFocus); 138 virtual bool Destroy(); 139 virtual void SetValidator( const wxValidator &validator ); 140 virtual wxValidator* GetValidator(); 141 142 143 protected: 144 virtual bool ProcessEvent(wxEvent & event); 145 virtual void DoEnable(bool enable); 146 virtual void DoGetPosition(int *x, int *y) const; 147 virtual void DoGetSize(int *width, int *height) const; 148 virtual void DoGetClientSize(int *width, int *height) const; 149 virtual wxSize DoGetBestSize() const; 150 virtual wxSize DoGetBestClientSize() const; 151 virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); 152 virtual void DoSetClientSize(int width, int height); 153 virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); 154 virtual wxSize DoGetBorderSize() const; 155 virtual void DoMoveWindow(int x, int y, int width, int height); 156 virtual void DoSetWindowVariant( wxWindowVariant variant); 157 virtual wxBorder GetDefaultBorder() const; 158 virtual wxBorder GetDefaultBorderForControl() const; 159 virtual void DoFreeze(); 160 virtual void DoThaw(); 161 virtual bool HasTransparentBackground(); 162 virtual bool TryBefore(wxEvent& event); 163 virtual bool TryAfter(wxEvent& event); 164 165 166 public: 167 168 169 static 170 wxVisualAttributes GetClassDefaultAttributes( 171 wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL 172 ); 173 %Docstring 174 GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes 175 %End 176 %PreMethodCode 177 if (!wxPyCheckForApp()) return NULL; 178 %End 179 180 public: 181 182 183 %Property(name=PageSize, get=GetPageSize) 184 %Property(name=Range, get=GetRange) 185 %Property(name=ThumbPosition, get=GetThumbPosition, set=SetThumbPosition) 186 %Property(name=ThumbSize, get=GetThumbSize) 187}; // end of class wxScrollBar 188 189 190 191//--------------------------------------------------------------------------- 192 193