done various @todo items

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-12-29 14:14:39 +00:00
parent 516cf181f8
commit f045c7f52d
6 changed files with 85 additions and 40 deletions

View File

@@ -11,14 +11,31 @@
@class wxAppConsole @class wxAppConsole
This class is essential for writing console-only or hybrid apps without 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.
@todo MORE INFO 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.
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} @library{wxbase}
@category{appmanagement} @category{appmanagement}
@see @ref overview_app @see @ref overview_app, wxApp, wxAppTraits, wxEventLoop
*/ */
class wxAppConsole : public wxEvtHandler class wxAppConsole : public wxEvtHandler
{ {
@@ -159,6 +176,15 @@ public:
*/ */
static bool IsMainLoopRunning(); 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. Called in response of an "open-application" Apple event.
Override this to create a new document in your app. Override this to create a new document in your app.
@@ -478,26 +504,19 @@ public:
/** /**
@class wxApp @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; In addition to the features provided by wxAppConsole it keeps track of
@li implement the windowing system message or event loop; the <em>top window</em> (see SetTopWindow()) and adds support for
@li initiate application processing via wxApp::OnInit; video modes (see SetVideoMode()).
@li allow default processing of events not handled by other
objects in the application.
You should use the macro IMPLEMENT_APP(appClass) in your application In general, application-wide settings for GUI-only apps are accessible
implementation file to tell wxWidgets how to create an instance of your from wxApp (or from wxSystemSettings).
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.
@library{wxbase} @library{wxbase}
@category{appmanagement} @category{appmanagement}
@see @ref overview_app @see @ref overview_app, wxAppTraits, wxEventLoop, wxSystemSettings
*/ */
class wxApp : public wxAppConsole class wxApp : public wxAppConsole
{ {
@@ -513,6 +532,12 @@ public:
*/ */
virtual ~wxApp(); 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. Returns @true if the application will exit when the top-level frame is deleted.
@@ -520,6 +545,12 @@ public:
*/ */
bool GetExitOnFrameDelete() const; 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 Returns @true if the application will use the best visual on systems that support
different visuals, @false otherwise. different visuals, @false otherwise.
@@ -587,6 +618,13 @@ public:
*/ */
virtual bool SendIdleEvents(wxWindow* win, wxIdleEvent& event); 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 Allows the programmer to specify whether the application will exit when the
top-level frame is deleted. 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(). function implemented by IMPLEMENT_APP().
It creates the declaration <tt>className& wxGetApp()</tt>. It creates the declaration <tt>className& wxGetApp()</tt>.

View File

@@ -93,12 +93,11 @@ public:
It's normally the same for wxBase and wxGUI except in the case of wxMac It's normally the same for wxBase and wxGUI except in the case of wxMac
and wxCocoa. and wxCocoa.
@todo the real function returns a reference to wxStandardPathsBase; @note
user looking at these docs will write code: The returned reference is to a @c wxStandardPathsBase class but you
wxStandardPaths &ref = ...->GetStandardPaths(); can consider it to be equivalent to wxStandardPaths (which is documented).
which won't compile...
*/ */
virtual wxStandardPaths& GetStandardPaths(); virtual wxStandardPathsBase& GetStandardPaths();
/** /**
Returns the wxWidgets port ID used by the running program and eventually Returns the wxWidgets port ID used by the running program and eventually

View File

@@ -6,13 +6,6 @@
// Licence: wxWindows license // 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 @class wxArrayString
@@ -53,11 +46,16 @@
@library{wxbase} @library{wxbase}
@category{containers} @category{containers}
@see wxArray, wxString, @ref overview_string @see wxArray<T>, wxString, @ref overview_string
*/ */
class wxArrayString : public wxArray class wxArrayString : public wxArray
{ {
public: public:
/**
The function type used with wxArrayString::Sort function.
*/
typedef int (*CompareFunction)(const wxString& first, const wxString& second);
/** /**
Default constructor. Default constructor.
*/ */
@@ -198,7 +196,7 @@ public:
/** /**
Sorts the array using the specified @a compareFunction for item comparison. 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 <em>const wxString&</em>
parameters and returning an @e int value less than, equal to or greater 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 than 0 if the first string is less than, equal to or greater than the
second one. second one.
@@ -305,7 +303,7 @@ public:
bool bFromEnd = false) const; 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 could break the order of items and, for example, subsequent calls
to Index() would then not work! 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() break the order of items and, for example, subsequent calls to Index()
would then not work! Also, sorting a wxSortedArrayString doesn't make would then not work! Also, sorting a wxSortedArrayString doesn't make
sense because its elements are always already sorted. sense because its elements are always already sorted.

View File

@@ -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. wxLanguageInfo: encapsulates ::wxLanguage to OS native lang.desc.
translation information translation information

View File

@@ -191,12 +191,12 @@ public:
<TABLE> <TABLE>
<TR> <TR>
<TD>@b Special character</TD> <TD><b>Special character</b></TD>
<TD>@b Escape as</TD> <TD><b>Escape as</b></TD>
</TR> </TR>
<TR> <TR>
<TD>@c &amp;</TD> <TD>@c &amp;</TD>
<TD>@c &amp;amp; or as &amp;&amp;</TD> <TD>@c &amp;amp; or as @c &amp;&amp;</TD>
</TR> </TR>
<TR> <TR>
<TD>@c &apos;</TD> <TD>@c &apos;</TD>

View File

@@ -8,7 +8,6 @@
/** /**
wxWeakRefDynamic<T> is a template class for weak references that is used in wxWeakRefDynamic<T> is a template class for weak references that is used in
the same way as wxWeakRef<T>. The only difference is that wxWeakRefDynamic the same way as wxWeakRef<T>. The only difference is that wxWeakRefDynamic
defaults to using @c dynamic_cast for establishing the object reference defaults to using @c dynamic_cast for establishing the object reference
@@ -28,7 +27,7 @@
For API documentation, see: wxWeakRef<T>. For API documentation, see: wxWeakRef<T>.
@tparam T @tparam T
@todo docme The type to which the smart pointer points to.
@nolibrary @nolibrary
@category{smartpointers} @category{smartpointers}
@@ -92,7 +91,7 @@ public:
@endcode @endcode
@tparam T @tparam T
@todo docme The type to which the smart pointer points to.
@nolibrary @nolibrary
@category{smartpointers} @category{smartpointers}