]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/notifmsg.tex
no changes, just come cleanup and more comments
[wxWidgets.git] / docs / latex / wx / notifmsg.tex
... / ...
CommitLineData
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: notifmsg.tex
3%% Purpose: wxNotificationMessage documentation
4%% Author: Vadim Zeitlin
5%% Created: 2007-11-24
6%% RCS-ID: $Id$
7%% Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwidgets.org>
8%% License: wxWindows license
9%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10
11\section{\class{wxNotificationMessage}}\label{wxnotificationmessage}
12
13This class allows to show the user a message non intrusively. Currently it is
14implemented natively only for the Maemo platform and uses (non-modal) dialogs
15for the display of the notifications under the other platforms but it will be
16extended to use the platform-specific notifications in the other ports in the
17future.
18
19Notice that this class is not a window and so doesn't derive from wxWindow.
20
21\wxheading{Derived from}
22
23\helpref{wxEvtHandler}{wxevthandler}
24
25\wxheading{Include files}
26
27<wx/notifmsg.h>
28
29\latexignore{\rtfignore{\wxheading{Members}}}
30
31
32\membersection{wxNotificationMessage::wxNotificationMessage}\label{wxnotificationmessagewxnotificationmessage}
33
34\func{}{wxNotificationMessage}{\void}
35
36Default constructor, use \helpref{SetParent}{wxnotificationmessagesetparent},
37\helpref{SetTitle}{wxnotificationmessagesettitle} and
38\helpref{SetMessage}{wxnotificationmessagesetmessage} to initialize the object
39before showing it.
40
41
42\func{}{wxNotificationMessage}{\param{const wxString\& }{title}, \param{const wxString\& }{message = wxString()}, \param{wxWindow* }{parent = NULL}, \param{int }{flags = \texttt{wxICON\_INFORMATION}}}
43
44Create a notification object with the given attributes.
45
46See \helpref{SetTitle}{wxnotificationmessagesettitle},
47\helpref{SetMessage}{wxnotificationmessagesetmessage},
48\helpref{SetParent}{wxnotificationmessagesetparent} and
49\helpref{SetFlags}{wxnotificationmessagesetflags} for the description of the
50corresponding parameters.
51
52
53\membersection{wxNotificationMessage::Close}\label{wxnotificationmessageclose}
54
55\func{bool}{Close}{\void}
56
57Hides the notification.
58
59Returns \true if it was hidden or \false if it couldn't be done (e.g. on some
60systems automatically hidden notifications can't be hidden manually)
61
62
63\membersection{wxNotificationMessage::SetFlags}\label{wxnotificationmessagesetflags}
64
65\func{void}{SetFlags}{\param{int }{flags}}
66
67This parameter can be currently used to specify the icon to show in the
68notification. Valid values are \texttt{wxICON\_INFORMATION},
69\texttt{wxICON\_WARNING} and \texttt{wxICON\_ERROR} (notice that
70\texttt{wxICON\_QUESTION} is not allowed here).
71
72Some implementations of this class may not support the icons.
73
74
75\membersection{wxNotificationMessage::SetMessage}\label{wxnotificationmessagesetmessage}
76
77\func{void}{SetMessage}{\param{const wxString\& }{message}}
78
79Set the main text of the notification. This should be a more detailed
80description than the title but still limited to reasonable length (not more
81than 256 characters).
82
83
84\membersection{wxNotificationMessage::SetParent}\label{wxnotificationmessagesetparent}
85
86\func{void}{SetParent}{\param{wxWindow* }{parent}}
87
88Set the parent for this notification: the notification will be associated with
89the top level parent of this window or, if this method is not called, with the
90main application window by default
91
92
93\membersection{wxNotificationMessage::SetTitle}\label{wxnotificationmessagesettitle}
94
95\func{void}{SetTitle}{\param{const wxString\& }{title}}
96
97Set the title, it must be a concise string (not more than 64 characters), use
98\helpref{SetMessage}{wxnotificationmessagesetmessage} to give the user more
99details.
100
101
102\membersection{wxNotificationMessage::Show}\label{wxnotificationmessageshow}
103
104\func{bool}{Show}{\param{int }{timeout = Timeout\_Auto}}
105
106Show the notification to the user and hides it after timeout seconds
107pass. Special values \texttt{Timeout\_Auto} and \texttt{Timeout\_Never} can be
108used here, notice that you shouldn't rely on \arg{timeout} being exactly
109respected because the current platform may only support default timeout value
110and also because the user may be able to close the notification.
111
112Returns \false if an error occurred.
113