A few doc fixes to BApplication and BHandler.
* Since <em> is used for parameters we can't use it for emphasis. * Add \a in a few places it was missing to indicate a parameter. * Change \a to a \c in one instance, param -> constant. * Lots of whitespace fixes, most just deleting leading tabs. * Don't indent code blocks, they should be flush to left since any indentation is preserved in the output.
This commit is contained in:
@@ -387,10 +387,10 @@ main()
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn BWindow* BApplication::WindowAt(int32 index) const
|
\fn BWindow* BApplication::WindowAt(int32 index) const
|
||||||
\brief Returns the BWindow object at the specified index in the
|
\brief Returns the BWindow object at the specified \a index in the
|
||||||
application's window list.
|
application's window list.
|
||||||
|
|
||||||
If index is out of range, this function returns \c NULL.
|
If \a index is out of range, this function returns \c NULL.
|
||||||
|
|
||||||
\warning Locking the BApplication object doesn't lock the window list.
|
\warning Locking the BApplication object doesn't lock the window list.
|
||||||
|
|
||||||
@@ -520,7 +520,8 @@ main()
|
|||||||
If the \a rate is set to 0 then the \c B_PULSE messages are not sent.
|
If the \a rate is set to 0 then the \c B_PULSE messages are not sent.
|
||||||
The pulse rate can be no faster than once per 100,000 microseconds or so.
|
The pulse rate can be no faster than once per 100,000 microseconds or so.
|
||||||
|
|
||||||
\param rate The rate \a B_PULSE messages are sent to the application.
|
\param rate The rate at which \c B_PULSE messages are sent to the
|
||||||
|
application.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+18
-16
@@ -156,6 +156,7 @@
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\name Archiving
|
\name Archiving
|
||||||
|
|
||||||
BHandler inherits the BArchivable class, and as such implements support for
|
BHandler inherits the BArchivable class, and as such implements support for
|
||||||
archiving and unarchiving handlers.
|
archiving and unarchiving handlers.
|
||||||
*/
|
*/
|
||||||
@@ -279,10 +280,10 @@ ShowImageApp::MessageReceived(BMessage *message)
|
|||||||
/*!
|
/*!
|
||||||
\fn void BHandler::SetNextHandler(BHandler *handler)
|
\fn void BHandler::SetNextHandler(BHandler *handler)
|
||||||
\brief Set the next handler in the chain that the message is passed on to
|
\brief Set the next handler in the chain that the message is passed on to
|
||||||
if this handler cannot process it.
|
if this \a handler cannot process it.
|
||||||
|
|
||||||
This method has three requirements:
|
This method has three requirements:
|
||||||
-# This handler should belong to a looper.
|
-# This \a handler should belong to a looper.
|
||||||
-# The looper needs to be locked. See LockLooper().
|
-# The looper needs to be locked. See LockLooper().
|
||||||
-# The \a handler that you pass must be associated with the same looper.
|
-# The \a handler that you pass must be associated with the same looper.
|
||||||
|
|
||||||
@@ -470,9 +471,9 @@ ShowImageApp::MessageReceived(BMessage *message)
|
|||||||
|
|
||||||
Note that there is a semantic difference between the two StartWatching()
|
Note that there is a semantic difference between the two StartWatching()
|
||||||
methods. The overloaded method that accepts a BHandler, expects as
|
methods. The overloaded method that accepts a BHandler, expects as
|
||||||
argument an \a observer that watches <em>this handler</em>. The method that
|
argument an \a observer that watches this handler. The method that
|
||||||
accepts a BMessenger, expects a \a target that emits the state changes
|
accepts a BMessenger, expects a \a target that emits the state changes
|
||||||
<em>to this handler</em>.
|
to this handler.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -484,16 +485,16 @@ ShowImageApp::MessageReceived(BMessage *message)
|
|||||||
\brief Subscribe this handler to watch a specific state change of a
|
\brief Subscribe this handler to watch a specific state change of a
|
||||||
\a target.
|
\a target.
|
||||||
|
|
||||||
Use this method to subscribe messengers to watch state changes in <em>this
|
Use this method to subscribe messengers to watch state changes in this
|
||||||
handler</em>. This means that also observers from other teams can be
|
handler, this also means that observers from other teams can be
|
||||||
subscribed.
|
subscribed.
|
||||||
|
|
||||||
\code
|
\code
|
||||||
// Handler B watches Handler A
|
// Handler B watches Handler A
|
||||||
BHandler A, B;
|
BHandler A, B;
|
||||||
BMessenger messengerA(&A)
|
BMessenger messengerA(&A)
|
||||||
|
|
||||||
B.StartWatching(messengerA, kNetworkConnection);
|
B.StartWatching(messengerA, kNetworkConnection);
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\param target The messenger from which the notifications would be
|
\param target The messenger from which the notifications would be
|
||||||
@@ -502,6 +503,7 @@ ShowImageApp::MessageReceived(BMessage *message)
|
|||||||
\return During the call of this method, a notification will be transmitted
|
\return During the call of this method, a notification will be transmitted
|
||||||
using the \a target. If this works, then this method will return
|
using the \a target. If this works, then this method will return
|
||||||
\c B_OK.
|
\c B_OK.
|
||||||
|
|
||||||
\see StartWatchingAll(BMessenger), StopWatching(BMessenger, uint32)
|
\see StartWatchingAll(BMessenger), StopWatching(BMessenger, uint32)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -543,13 +545,13 @@ ShowImageApp::MessageReceived(BMessage *message)
|
|||||||
\brief Subscribe an \a observer for a specific state change of this handler.
|
\brief Subscribe an \a observer for a specific state change of this handler.
|
||||||
|
|
||||||
Use this method to subscribe observers to watch this handler. State changes
|
Use this method to subscribe observers to watch this handler. State changes
|
||||||
of this handler that match the \a what argment, will be sent.
|
of this handler that match the \a what argument, will be sent.
|
||||||
|
|
||||||
\code
|
\code
|
||||||
// Handler B wants to observe Handler A
|
// Handler B wants to observe Handler A
|
||||||
BHandler A, B;
|
BHandler A, B;
|
||||||
|
|
||||||
A.StartWatching(&B, kNetworkConnection);
|
A.StartWatching(&B, kNetworkConnection);
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
Since pointers to handlers can only
|
Since pointers to handlers can only
|
||||||
@@ -568,7 +570,7 @@ ShowImageApp::MessageReceived(BMessage *message)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn status_t BHandler::StartWatchingAll(BHandler* observer)
|
\fn status_t BHandler::StartWatchingAll(BHandler* observer)
|
||||||
\brief Subscribe an \a observer for a all state changes.
|
\brief Subscribe an \a observer for a all state changes.
|
||||||
|
|
||||||
This method performs the same task as StartWatching(BHandler, uint32),
|
This method performs the same task as StartWatching(BHandler, uint32),
|
||||||
but it will subscribe the \a observer to all the state changes this handler
|
but it will subscribe the \a observer to all the state changes this handler
|
||||||
@@ -606,6 +608,7 @@ ShowImageApp::MessageReceived(BMessage *message)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\name Emitting State Changes
|
\name Emitting State Changes
|
||||||
|
|
||||||
If your handler functions as a state machine, and it has observers (which
|
If your handler functions as a state machine, and it has observers (which
|
||||||
subscribed using the StartWatching() method), you can emit these state
|
subscribed using the StartWatching() method), you can emit these state
|
||||||
changes.
|
changes.
|
||||||
@@ -640,4 +643,3 @@ ShowImageApp::MessageReceived(BMessage *message)
|
|||||||
|
|
||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user