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* wxButtonNameStr; 14 15class wxButton : wxAnyButton 16{ 17 %Docstring 18 Button() 19 Button(parent, id=ID_ANY, label=EmptyString, pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=ButtonNameStr) 20 21 A button is a control that contains a text string, and is one of the 22 most common elements of a GUI. 23 %End 24 %TypeHeaderCode 25 #include <wx/button.h> 26 %End 27 28public: 29 wxButton(); 30 %PreMethodCode 31 if (!wxPyCheckForApp()) return NULL; 32 %End 33 34 wxButton( 35 wxWindow * parent /TransferThis/, 36 wxWindowID id = wxID_ANY, 37 const wxString & label = wxEmptyString, 38 const wxPoint & pos = wxDefaultPosition, 39 const wxSize & size = wxDefaultSize, 40 long style = 0, 41 const wxValidator & validator = wxDefaultValidator, 42 const wxString & name = wxButtonNameStr 43 ); 44 %PreMethodCode 45 if (!wxPyCheckForApp()) return NULL; 46 %End 47 48 bool Create( 49 wxWindow * parent /TransferThis/, 50 wxWindowID id = wxID_ANY, 51 const wxString & label = wxEmptyString, 52 const wxPoint & pos = wxDefaultPosition, 53 const wxSize & size = wxDefaultSize, 54 long style = 0, 55 const wxValidator & validator = wxDefaultValidator, 56 const wxString & name = wxButtonNameStr 57 ); 58 %Docstring 59 Create(parent, id=ID_ANY, label=EmptyString, pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=ButtonNameStr) -> bool 60 61 Button creation function for two-step creation. 62 %End 63 64 bool GetAuthNeeded() const; 65 %Docstring 66 GetAuthNeeded() -> bool 67 68 Returns true if an authentication needed symbol is displayed on the 69 button. 70 %End 71 72 wxString GetLabel() const; 73 %Docstring 74 GetLabel() -> String 75 76 Returns the string label for the button. 77 %End 78 79 void SetAuthNeeded( 80 bool needed = true 81 ); 82 %Docstring 83 SetAuthNeeded(needed=True) 84 85 Sets whether an authentication needed symbol should be displayed on 86 the button. 87 %End 88 89 wxWindow * SetDefault(); 90 %Docstring 91 SetDefault() -> Window 92 93 This sets the button to be the default item in its top-level window 94 (e.g. 95 %End 96 97 void SetLabel( 98 const wxString & label 99 ); 100 %Docstring 101 SetLabel(label) 102 103 Sets the string label for the button. 104 %End 105 106 static 107 wxSize GetDefaultSize(); 108 %Docstring 109 GetDefaultSize() -> Size 110 111 Returns the default size for the buttons. 112 %End 113 %PreMethodCode 114 if (!wxPyCheckForApp()) return NULL; 115 %End 116 117 public: 118 virtual wxPoint GetClientAreaOrigin() const; 119 virtual bool Validate(); 120 virtual bool TransferDataToWindow(); 121 virtual bool TransferDataFromWindow(); 122 virtual void InitDialog(); 123 virtual bool AcceptsFocus() const; 124 virtual bool AcceptsFocusRecursively() const; 125 virtual bool AcceptsFocusFromKeyboard() const; 126 virtual void AddChild( wxWindowBase *child ); 127 virtual void RemoveChild( wxWindowBase *child ); 128 virtual void InheritAttributes(); 129 virtual bool ShouldInheritColours() const; 130 virtual void OnInternalIdle(); 131 virtual wxWindow *GetMainWindowOfCompositeControl(); 132 virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); 133 virtual void SetCanFocus(bool canFocus); 134 virtual bool Destroy(); 135 virtual void SetValidator( const wxValidator &validator ); 136 virtual wxValidator* GetValidator(); 137 138 139 protected: 140 virtual bool ProcessEvent(wxEvent & event); 141 virtual void DoEnable(bool enable); 142 virtual void DoGetPosition(int *x, int *y) const; 143 virtual void DoGetSize(int *width, int *height) const; 144 virtual void DoGetClientSize(int *width, int *height) const; 145 virtual wxSize DoGetBestSize() const; 146 virtual wxSize DoGetBestClientSize() const; 147 virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); 148 virtual void DoSetClientSize(int width, int height); 149 virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); 150 virtual wxSize DoGetBorderSize() const; 151 virtual void DoMoveWindow(int x, int y, int width, int height); 152 virtual void DoSetWindowVariant( wxWindowVariant variant); 153 virtual wxBorder GetDefaultBorder() const; 154 virtual wxBorder GetDefaultBorderForControl() const; 155 virtual void DoFreeze(); 156 virtual void DoThaw(); 157 virtual bool HasTransparentBackground(); 158 virtual bool TryBefore(wxEvent& event); 159 virtual bool TryAfter(wxEvent& event); 160 161 162 public: 163 164 165 static 166 wxVisualAttributes GetClassDefaultAttributes( 167 wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL 168 ); 169 %Docstring 170 GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes 171 %End 172 %PreMethodCode 173 if (!wxPyCheckForApp()) return NULL; 174 %End 175 176 public: 177 178 179 %Property(name=AuthNeeded, get=GetAuthNeeded, set=SetAuthNeeded) 180 %Property(name=Label, get=GetLabel, set=SetLabel) 181}; // end of class wxButton 182 183 184 185//--------------------------------------------------------------------------- 186 187