button.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/button.h
  3. // Purpose: wxButtonBase class
  4. // Author: Vadim Zetlin
  5. // Modified by:
  6. // Created: 15.08.00
  7. // Copyright: (c) Vadim Zetlin
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_BUTTON_H_BASE_
  11. #define _WX_BUTTON_H_BASE_
  12. #include "wx/defs.h"
  13. #if wxUSE_BUTTON
  14. #include "wx/anybutton.h"
  15. extern WXDLLIMPEXP_DATA_CORE(const char) wxButtonNameStr[];
  16. // ----------------------------------------------------------------------------
  17. // wxButton: a push button
  18. // ----------------------------------------------------------------------------
  19. class WXDLLIMPEXP_CORE wxButtonBase : public wxAnyButton
  20. {
  21. public:
  22. wxButtonBase() { }
  23. // show the authentication needed symbol on the button: this is currently
  24. // only implemented on Windows Vista and newer (on which it shows the UAC
  25. // shield symbol)
  26. void SetAuthNeeded(bool show = true) { DoSetAuthNeeded(show); }
  27. bool GetAuthNeeded() const { return DoGetAuthNeeded(); }
  28. // make this button the default button in its top level window
  29. //
  30. // returns the old default item (possibly NULL)
  31. virtual wxWindow *SetDefault();
  32. // returns the default button size for this platform
  33. static wxSize GetDefaultSize();
  34. protected:
  35. wxDECLARE_NO_COPY_CLASS(wxButtonBase);
  36. };
  37. #if defined(__WXUNIVERSAL__)
  38. #include "wx/univ/button.h"
  39. #elif defined(__WXMSW__)
  40. #include "wx/msw/button.h"
  41. #elif defined(__WXMOTIF__)
  42. #include "wx/motif/button.h"
  43. #elif defined(__WXGTK20__)
  44. #include "wx/gtk/button.h"
  45. #elif defined(__WXGTK__)
  46. #include "wx/gtk1/button.h"
  47. #elif defined(__WXMAC__)
  48. #include "wx/osx/button.h"
  49. #elif defined(__WXCOCOA__)
  50. #include "wx/cocoa/button.h"
  51. #elif defined(__WXPM__)
  52. #include "wx/os2/button.h"
  53. #endif
  54. #endif // wxUSE_BUTTON
  55. #endif // _WX_BUTTON_H_BASE_