#include <Handler.h>
Inheritance diagram for BHandler:

Public Member Functions | |
| BHandler (const char *name=NULL) | |
| virtual | ~BHandler () |
| BHandler (BMessage *data) | |
| virtual status_t | Archive (BMessage *data, bool deep=true) const |
| virtual void | MessageReceived (BMessage *message) |
| BLooper * | Looper () const |
| void | SetName (const char *name) |
| const char * | Name () const |
| virtual void | SetNextHandler (BHandler *handler) |
| BHandler * | NextHandler () const |
| virtual void | AddFilter (BMessageFilter *filter) |
| virtual bool | RemoveFilter (BMessageFilter *filter) |
| virtual void | SetFilterList (BList *filters) |
| BList * | FilterList () |
| bool | LockLooper () |
| status_t | LockLooperWithTimeout (bigtime_t timeout) |
| void | UnlockLooper () |
| virtual BHandler * | ResolveSpecifier (BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property) |
| virtual status_t | GetSupportedSuites (BMessage *data) |
| status_t | StartWatching (BMessenger, uint32 what) |
| status_t | StartWatchingAll (BMessenger) |
| status_t | StopWatching (BMessenger, uint32 what) |
| status_t | StopWatchingAll (BMessenger) |
| status_t | StartWatching (BHandler *, uint32 what) |
| status_t | StartWatchingAll (BHandler *) |
| status_t | StopWatching (BHandler *, uint32 what) |
| status_t | StopWatchingAll (BHandler *) |
| virtual status_t | Perform (perform_code d, void *arg) |
| virtual void | SendNotices (uint32 what, const BMessage *=0) |
| bool | IsWatched () const |
Static Public Member Functions | |
| static BArchivable * | Instantiate (BMessage *data) |
Friends | |
| class | BLooper |
| class | BMessageFilter |
| int32 | _get_object_token_ (const BHandler *) |
|
|
Initializes the BHandler by assigning it a name and registering it with the messaging system.
|
|
|
Deletes any BMessageFilters assigned to the BHandler. |
|
|
BHandlers can also be reconstructed from a BMessage archive.
|
|
|
Managing a list of BMessageFilter objects associated with the BHandler. AddFilter() adds a filter to the end of the BHandler's list of filters. It creates the BList object if it doesn't already exist. By default, BHandlers don't maintain a BList of filters until one is assigned or the first BMessageFilter is added.
|
|
||||||||||||
|
BHandlers can also be reconstructed from a BMessage archive.
Reimplemented from BArchivable. Reimplemented in BMailProtocolConfigView, BApplication, BLooper, LayoutHVGroup, LayoutManager, BSpinField, BStringView, BTextField, BDirectWindow, BAlert, BBox, BButton, BChannelControl, BChannelSlider, BCheckBox, BColorControl, BControl, BDragger, BListView, BMenu, BMenuBar, BMenuField, BOutlineListView, BPictureButton, BPopUpMenu, BRadioButton, BScrollBar, BScrollView, BSeparator, BShelf, BSlider, BSlideRule, BSpeedButton, BStatusBar, BStringView, BTabView, BTextControl, BTextListControl, BTextView, BView, BWindow, and BPrintConfigView. |
|
|
Managing a list of BMessageFilter objects associated with the BHandler. FilterList() returns the current list of filters. For SetFilterList(), AddFilter(), and RemoveFilter() to work, the BHandler must be assigned to a BLooper object and the BLooper must be locked. |
|
|
Reimplemented in BApplication, BLooper, BDirectWindow, BAlert, BBox, BButton, BChannelControl, BChannelSlider, BCheckBox, BColorControl, BControl, BDragger, BListView, BMenu, BMenuBar, BMenuField, BOutlineListView, BPictureButton, BPopUpMenu, BRadioButton, BScrollBar, BScrollView, BShelf, BSlider, BStatusBar, BStringView, BTabView, BTextControl, BTextListControl, BTextView, BView, BWindow, BMediaRoster, BDirectGLWindow, and BPrintConfigView. |
|
|
Reimplemented from BArchivable. Reimplemented in BApplication, BLooper, LayoutHVGroup, LayoutManager, BSpinField, BStringView, BTextField, BDirectWindow, BAlert, BBox, BButton, BChannelSlider, BCheckBox, BColorControl, BControl, BDragger, BListView, BMenu, BMenuBar, BMenuField, BOutlineListView, BPictureButton, BPopUpMenu, BRadioButton, BScrollBar, BScrollView, BSeparator, BShelf, BSlider, BSlideRule, BSpeedButton, BStatusBar, BStringView, BTabView, BTextControl, BTextListControl, BTextView, BView, BWindow, and BPrintConfigView. |
|
|
|
|
|
This are a "smart" version of BLooper's locking functions (BLooper::Lock() et. al.). The difference between the versions is that these functions retrieve the handler's looper and lock it (or unlock it) in a pseudo-atomic operation, thus avoiding a race condition.
|
|
|
Except for an additional return value in LockLooperWithTimeout(), these functions are identical to their BLooper analogues. See to BLooper::Lock() for details.
|
|
|
Note that a BLooper object automatically adds itself (as a handler) to itself (as a looper), and a BWindow automatically adds its child views. To explicitly add a handler to a looper, you call BLooper::AddHandler(). |
|
|
|
Name() returns the current name of the BHandler. The string returned by Name() belongs to the BHandler object; it shouldn't be altered or freed. The name is originally set by the constructor. |
|
|
NextHandler() returns this object next handler.
|
|
||||||||||||
|
Reimplemented from BArchivable. Reimplemented in BApplication, BLooper, BDirectWindow, BWindowScreen, BAlert, BBox, BButton, BCheckBox, BColorControl, BControl, BDragger, BListView, BMenu, BMenuBar, BMenuField, BOutlineListView, BPictureButton, BPopUpMenu, BRadioButton, BScrollBar, BScrollView, BShelf, BSlider, BStatusBar, BStringView, BTabView, BTextControl, BTextListControl, BTextView, BView, BWindow, BDirectGLWindow, and BPrintConfigView. |
|
|
Managing a list of BMessageFilter objects associated with the BHandler. RemoveFilter() removes a filter from the list without deleting it. It returns true if successful, and false if it can't find the specified filter in the list (or the list doesn't exist). It leaves the BList in place even after removing the last filter.
|
|
||||||||||||||||||||||||
|
Reimplemented in BApplication, BLooper, BDirectWindow, BAlert, BBox, BButton, BChannelControl, BChannelSlider, BCheckBox, BColorControl, BControl, BDragger, BListView, BMenu, BMenuBar, BMenuField, BOutlineListView, BPictureButton, BPopUpMenu, BRadioButton, BScrollBar, BScrollView, BShelf, BSlider, BStatusBar, BStringView, BTabView, BTextControl, BTextListControl, BTextView, BView, BWindow, BMediaRoster, BDirectGLWindow, and BPrintConfigView. |
|
||||||||||||
|
|
|
|
Managing a list of BMessageFilter objects associated with the BHandler. SetFilterList() assigns the BHandler a new list of filters; the list must contain pointers to instances of the BMessageFilter class or to instances of classes that derive from BMessageFilter. The new list replaces any list of filters previously assigned. All objects in the previous list are deleted, as is the BList that contains them. If list is NULL, the current list is removed without a replacement.
|
|
|
SetName() assigns the BHandler a new name. The name is originally set by the constructor. |
|
|
SetNextHandler() reorders the objects in the handler chain so that handler follows this BHandler. This BHandler and handler must already be part of the same chain, and the BLooper they belong to must be locked. The order of objects in the handler chain affects the way in-coming messages are handled (as explained in "Inheritance and the Handler Chain". By default handlers are placed in the order that they're added (through BLooper::AddHandler())
|
|
||||||||||||
|
StartWatching() registers the BMessenger or BHandler specified by watcher to be notified whenever the state specified by what changes.
|
|
||||||||||||
|
StartWatching() registers the BMessenger or BHandler specified by watcher to be notified whenever the state specified by what changes.
|
|
|
StartWatchingAll() registers the specified BMessenger or BHandler to be notified when any of the notifer's states change.
|
|
|
|
|
||||||||||||
|
StopWatching() ceases monitoring of the state what.
|
|
||||||||||||
|
StopWatching() ceases monitoring of the state what.
|
|
|
StopWatchingAll(), by some odd coincidence, stops all monitoring by the BHandler or BMessenger specified by watcher.
|
|
|
StopWatchingAll(), by some odd coincidence, stops all monitoring by the BHandler or BMessenger specified by watcher.
|
|
|
|
|
|
|
|
|
|
|
|
|