From f045c7f52dfcfebcd0ea6a7b689ccb8a25021d1f Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Mon, 29 Dec 2008 14:14:39 +0000 Subject: [PATCH] done various @todo items git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/app.h | 74 +++++++++++++++++++++++++++++++---------- interface/wx/apptrait.h | 9 +++-- interface/wx/arrstr.h | 20 +++++------ interface/wx/intl.h | 11 ++++++ interface/wx/stattext.h | 6 ++-- interface/wx/weakref.h | 5 ++- 6 files changed, 85 insertions(+), 40 deletions(-) diff --git a/interface/wx/app.h b/interface/wx/app.h index 3a5e6a0858..ab2d90b964 100644 --- a/interface/wx/app.h +++ b/interface/wx/app.h @@ -11,14 +11,31 @@ @class wxAppConsole This class is essential for writing console-only or hybrid apps without - having to define wxUSE_GUI=0. + having to define @c wxUSE_GUI=0. + + It is used to: + @li set and get application-wide properties (see wxAppConsole::CreateTraits + and wxAppConsole::SetXXX functions) + @li implement the windowing system message or event loop: events in fact are + supported even in console-mode applications (see wxAppConsole::HandleEvent + and wxAppConsole::ProcessPendingEvents); + @li initiate application processing via wxApp::OnInit; + @li allow default processing of events not handled by other + objects in the application (see wxAppConsole::FilterEvent) + @li implement Apple-specific event handlers (see wxAppConsole::MacXXX functions) + + You should use the macro IMPLEMENT_APP(appClass) in your application + implementation file to tell wxWidgets how to create an instance of your + application class. - @todo MORE INFO + Use DECLARE_APP(appClass) in a header file if you want the ::wxGetApp() function + (which returns a reference to your application object) to be visible to other + files. @library{wxbase} @category{appmanagement} - @see @ref overview_app + @see @ref overview_app, wxApp, wxAppTraits, wxEventLoop */ class wxAppConsole : public wxEvtHandler { @@ -159,6 +176,15 @@ public: */ static bool IsMainLoopRunning(); + /** + Process all pending events; it is necessary to call this function to + process posted events. + + This happens during each event loop iteration in GUI mode but if there is + no main loop, it may be also called directly. + */ + virtual void ProcessPendingEvents(); + /** Called in response of an "open-application" Apple event. Override this to create a new document in your app. @@ -478,26 +504,19 @@ public: /** @class wxApp - The wxApp class represents the application itself. It is used to: + The wxApp class represents the application itself when @c wxUSE_GUI=1. - @li set and get application-wide properties; - @li implement the windowing system message or event loop; - @li initiate application processing via wxApp::OnInit; - @li allow default processing of events not handled by other - objects in the application. + In addition to the features provided by wxAppConsole it keeps track of + the top window (see SetTopWindow()) and adds support for + video modes (see SetVideoMode()). - You should use the macro IMPLEMENT_APP(appClass) in your application - implementation file to tell wxWidgets how to create an instance of your - application class. - - Use DECLARE_APP(appClass) in a header file if you want the wxGetApp function - (which returns a reference to your application object) to be visible to other - files. + In general, application-wide settings for GUI-only apps are accessible + from wxApp (or from wxSystemSettings). @library{wxbase} @category{appmanagement} - @see @ref overview_app + @see @ref overview_app, wxAppTraits, wxEventLoop, wxSystemSettings */ class wxApp : public wxAppConsole { @@ -513,6 +532,12 @@ public: */ virtual ~wxApp(); + /** + Get display mode that is used use. This is only used in framebuffer + wxWin ports (such as wxMGL or wxDFB). + */ + virtual wxVideoMode GetDisplayMode() const; + /** Returns @true if the application will exit when the top-level frame is deleted. @@ -520,6 +545,12 @@ public: */ bool GetExitOnFrameDelete() const; + /** + Return the layout direction for the current locale or @c wxLayout_Default + if it's unknown. + */ + virtual wxLayoutDirection GetLayoutDirection() const; + /** Returns @true if the application will use the best visual on systems that support different visuals, @false otherwise. @@ -587,6 +618,13 @@ public: */ virtual bool SendIdleEvents(wxWindow* win, wxIdleEvent& event); + /** + Set display mode to use. This is only used in framebuffer wxWin + ports (such as wxMGL or wxDFB). This method should be called from + wxApp::OnInitGui. + */ + virtual bool SetDisplayMode(const wxVideoMode& info); + /** Allows the programmer to specify whether the application will exit when the top-level frame is deleted. @@ -670,7 +708,7 @@ public: //@{ /** - This is used in headers to create a forward declaration of the wxGetApp() + This is used in headers to create a forward declaration of the ::wxGetApp() function implemented by IMPLEMENT_APP(). It creates the declaration className& wxGetApp(). diff --git a/interface/wx/apptrait.h b/interface/wx/apptrait.h index 5e8fd7ae66..6251c5623d 100644 --- a/interface/wx/apptrait.h +++ b/interface/wx/apptrait.h @@ -93,12 +93,11 @@ public: It's normally the same for wxBase and wxGUI except in the case of wxMac and wxCocoa. - @todo the real function returns a reference to wxStandardPathsBase; - user looking at these docs will write code: - wxStandardPaths &ref = ...->GetStandardPaths(); - which won't compile... + @note + The returned reference is to a @c wxStandardPathsBase class but you + can consider it to be equivalent to wxStandardPaths (which is documented). */ - virtual wxStandardPaths& GetStandardPaths(); + virtual wxStandardPathsBase& GetStandardPaths(); /** Returns the wxWidgets port ID used by the running program and eventually diff --git a/interface/wx/arrstr.h b/interface/wx/arrstr.h index 7303b4d8f2..a81aa37e19 100644 --- a/interface/wx/arrstr.h +++ b/interface/wx/arrstr.h @@ -6,13 +6,6 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -/** - @todo - the following functions are not documented; do they need to be? - WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortAscending(wxString*, wxString*); - WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortDescending(wxString*, wxString*); -*/ - /** @class wxArrayString @@ -53,11 +46,16 @@ @library{wxbase} @category{containers} - @see wxArray, wxString, @ref overview_string + @see wxArray, wxString, @ref overview_string */ class wxArrayString : public wxArray { public: + /** + The function type used with wxArrayString::Sort function. + */ + typedef int (*CompareFunction)(const wxString& first, const wxString& second); + /** Default constructor. */ @@ -198,7 +196,7 @@ public: /** Sorts the array using the specified @a compareFunction for item comparison. - @a CompareFunction is defined as a function taking two @e const wxString + @a CompareFunction is defined as a function taking two const wxString& parameters and returning an @e int value less than, equal to or greater than 0 if the first string is less than, equal to or greater than the second one. @@ -305,7 +303,7 @@ public: bool bFromEnd = false) const; /** - @warning this function should not be used with sorted arrays because it + @warning This function should not be used with sorted arrays because it could break the order of items and, for example, subsequent calls to Index() would then not work! */ @@ -314,7 +312,7 @@ public: //@{ /** - @warning this function should not be used with sorted array because it could + @warning This function should not be used with sorted array because it could break the order of items and, for example, subsequent calls to Index() would then not work! Also, sorting a wxSortedArrayString doesn't make sense because its elements are always already sorted. diff --git a/interface/wx/intl.h b/interface/wx/intl.h index 21f9ec1825..910ae7852d 100644 --- a/interface/wx/intl.h +++ b/interface/wx/intl.h @@ -262,6 +262,17 @@ enum wxLanguage +/** + This is the layout direction stored in wxLanguageInfo and returned by + wxApp::GetLayoutDirection() for RTL (right-to-left) languages support. +*/ +enum wxLayoutDirection +{ + wxLayout_Default, + wxLayout_LeftToRight, + wxLayout_RightToLeft +}; + /** wxLanguageInfo: encapsulates ::wxLanguage to OS native lang.desc. translation information diff --git a/interface/wx/stattext.h b/interface/wx/stattext.h index c5ebe78294..613d99661a 100644 --- a/interface/wx/stattext.h +++ b/interface/wx/stattext.h @@ -191,12 +191,12 @@ public: - - + + - + diff --git a/interface/wx/weakref.h b/interface/wx/weakref.h index d208d48804..05a5503fd8 100644 --- a/interface/wx/weakref.h +++ b/interface/wx/weakref.h @@ -8,7 +8,6 @@ /** - wxWeakRefDynamic is a template class for weak references that is used in the same way as wxWeakRef. The only difference is that wxWeakRefDynamic defaults to using @c dynamic_cast for establishing the object reference @@ -28,7 +27,7 @@ For API documentation, see: wxWeakRef. @tparam T - @todo docme + The type to which the smart pointer points to. @nolibrary @category{smartpointers} @@ -92,7 +91,7 @@ public: @endcode @tparam T - @todo docme + The type to which the smart pointer points to. @nolibrary @category{smartpointers} -- 2.47.2
@b Special character@b Escape asSpecial characterEscape as
@c &@c & or as &&@c & or as @c &&
@c '