mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-28 15:50:17 +08:00
Unix builds / Ubuntu 18.04 wxGTK 3 compatible 3.0 (push) Has been cancelled
Unix builds / Ubuntu 24.04 wxGTK ASAN not compatible (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK UTF-8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxQt (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxX11 (push) Has been cancelled
Unix builds / Ubuntu 20.04 wxGTK 3 with clang (push) Has been cancelled
Unix builds / Ubuntu 22.04 wxGTK with wx containers (push) Has been cancelled
Unix builds / Ubuntu 24.04 wxGTK UBSAN (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxDFB (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 static with gcc 4.8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 2 (push) Has been cancelled
CMake builds / Ubuntu 22.04 wxGTK 3 (push) Has been cancelled
CMake builds / MSW/MSVC wxMSW (push) Has been cancelled
CMake builds / MSW/Clang wxMSW (push) Has been cancelled
CMake builds / macOS latest wxOSX Ninja (push) Has been cancelled
CMake builds / macOS 14 wxOSX Xcode (push) Has been cancelled
CMake builds / macOS 14 wxIOS (push) Has been cancelled
CMake builds / MSW/MSVC wxQt 5.15 (push) Has been cancelled
CMake builds / MSW/MSVC wxQt 6.10 (push) Has been cancelled
Mac builds / wxMac ARM ASAN not compatible (push) Has been cancelled
Mac builds / wxMac Universal C++14 (push) Has been cancelled
Mac builds / wxiOS Simulator on Silicon Mac (push) Has been cancelled
Mac builds / wxiOS (push) Has been cancelled
Mac builds / wxMac Intel C++17 (push) Has been cancelled
Mac Xcode builds / iOS Simulator static (push) Has been cancelled
Mac Xcode builds / macOS dynamic Release (push) Has been cancelled
Mac Xcode builds / iOS static Debug (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Debug x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Release x64 (push) Has been cancelled
MSW builds / wxMSW vs2022 Debug Win32 (push) Has been cancelled
MSW builds / wxMSW vs2022 Release arm64 (push) Has been cancelled
MSW cross-builds / wxMSW 64 bits not compatible (push) Has been cancelled
MSW cross-builds / wxMSW/Univ (push) Has been cancelled
MSW cross-builds / wxMSW 32 bits (push) Has been cancelled
Code Checks / Check Spelling (push) Has been cancelled
Code Checks / Check Whitespace (push) Has been cancelled
Code Checks / Check Mixed EOL (push) Has been cancelled
Code Checks / Check C++ Style (push) Has been cancelled
Code Checks / Check All Headers In allheaders.h (push) Has been cancelled
Update Documentation / Update Online Documentation (push) Has been cancelled
No Response / no-response (push) Has been cancelled
Just run misc/scripts/inc_year and commit the results. See #18690.
129 lines
4.0 KiB
Objective-C
129 lines
4.0 KiB
Objective-C
///////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/generic/aboutdlgg.h
|
|
// Purpose: generic wxAboutBox() implementation
|
|
// Author: eranon
|
|
// Created: 2012-09-25
|
|
// Copyright: (c) 2012 wxWidgets development team
|
|
// Licence: wxWindows licence
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
/**
|
|
@class wxGenericAboutDialog
|
|
|
|
This class defines a customizable @e About dialog.
|
|
|
|
Note that if you don't need customization, you should use the global
|
|
wxAboutBox() function that is both easier to use and shows the native
|
|
dialog if available.
|
|
|
|
To use this class, you need to derive your own class from it and override
|
|
the virtual method DoAddCustomControls().
|
|
|
|
To instantiate an object from your wxGenericAboutDialog-based class, you
|
|
can use either the default constructor followed by a call to Create(), or
|
|
directly using the alternate constructor. In either case, you have to
|
|
prepare a wxAboutDialogInfo containing standard information to display in
|
|
an about-box.
|
|
|
|
Example of usage, MyAboutDlg being a class derived from wxGenericAboutDialog:
|
|
@code
|
|
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
|
{
|
|
wxAboutDialogInfo aboutInfo;
|
|
|
|
aboutInfo.SetName("MyApp");
|
|
aboutInfo.SetVersion(MY_APP_VERSION_STRING);
|
|
aboutInfo.SetDescription(_("My wxWidgets-based application!"));
|
|
aboutInfo.SetCopyright("(C) 1992-2026");
|
|
aboutInfo.SetWebSite("http://myapp.org");
|
|
aboutInfo.AddDeveloper("My Self");
|
|
|
|
MyAboutDlg dlgAbout(aboutInfo, this);
|
|
dlgAbout.ShowModal();
|
|
}
|
|
@endcode
|
|
|
|
@library{wxcore}
|
|
@category{cmndlg}
|
|
|
|
@see wxAboutDialogInfo
|
|
*/
|
|
class wxGenericAboutDialog
|
|
{
|
|
public:
|
|
/**
|
|
Default constructor, Create() must be called later.
|
|
*/
|
|
wxGenericAboutDialog();
|
|
|
|
/**
|
|
Creates the dialog and initializes it with the given information.
|
|
*/
|
|
wxGenericAboutDialog(const wxAboutDialogInfo& info, wxWindow* parent = nullptr);
|
|
|
|
/**
|
|
Initializes the dialog created using the default constructor.
|
|
*/
|
|
bool Create(const wxAboutDialogInfo& info, wxWindow* parent = nullptr);
|
|
|
|
protected:
|
|
/**
|
|
This virtual method may be overridden to add more controls to the
|
|
dialog.
|
|
|
|
The custom controls should be created with GetCustomControlParent() as
|
|
parent and then can be passed to the protected AddControl() method.
|
|
AddText() and AddCollapsiblePane() methods can also be used to add
|
|
simple static custom controls.
|
|
|
|
This method is called during the dialog creation and you don't need to
|
|
call it, only to override it.
|
|
*/
|
|
virtual void DoAddCustomControls() { }
|
|
|
|
/**
|
|
Add arbitrary control to the sizer content with the specified flags.
|
|
|
|
For example, here is how to add an expandable line with a border of 3
|
|
pixels, then a line of text:
|
|
@code
|
|
AddControl(new wxStaticLine(this), wxSizerFlags().Expand().Border(wxALL, 3));
|
|
|
|
AddText(_("This line is just an example of custom text."));
|
|
@endcode
|
|
*/
|
|
void AddControl(wxWindow *win, const wxSizerFlags& flags);
|
|
|
|
/**
|
|
Add arbitrary control to the sizer content and centre it.
|
|
*/
|
|
void AddControl(wxWindow *win);
|
|
|
|
/**
|
|
Add the given (not empty) text to the sizer content.
|
|
*/
|
|
void AddText(const wxString& text);
|
|
|
|
/**
|
|
Add a wxCollapsiblePane containing the given text.
|
|
*/
|
|
void AddCollapsiblePane(const wxString& title, const wxString& text);
|
|
|
|
/**
|
|
Return the parent to use for custom controls.
|
|
|
|
See DoAddCustomControls().
|
|
|
|
@since 3.3.0
|
|
*/
|
|
wxWindow* GetCustomControlParent() const;
|
|
};
|
|
|
|
/**
|
|
Show generic about dialog.
|
|
|
|
This function does the same thing as wxAboutBox() except that it always
|
|
uses the generic wxWidgets version of the dialog instead of the native one.
|
|
*/
|
|
void wxGenericAboutBox(const wxAboutDialogInfo& info, wxWindow* parent = nullptr);
|