diff --git a/docs/develop/app/usecases/BDeskbarUseCases.html b/docs/develop/app/usecases/BDeskbarUseCases.html index 45d6b16535..b620bb14a9 100644 --- a/docs/develop/app/usecases/BDeskbarUseCases.html +++ b/docs/develop/app/usecases/BDeskbarUseCases.html @@ -1,5 +1,5 @@ - +
Get Item Info 2:
Frame:
Frame: The Frame() member function returns a BRect which describes the location and +size of the deskbar on the screen.
Location:
Location: The Location() member function returns one of B_DESKBAR_TOP, +B_DESKBAR_BOTTOM, B_DESKBAR_LEFT_BOTTOM, B_DESKBAR_RIGHT_BOTTOM, B_DESKBAR_LEFT_TOP or +B_DESKBAR_RIGHT_TOP. The return value describes where the deskbar currently is located. Also, +the Location() member function takes an optional argument which is a pointer to a boolean. +If supplied, the boolean which is pointed to is set to true if the deskbar is expanded and false +otherwise. A deskbar can only be contracted (ie not expanded) when in the left or right top +position.
Is Expanded:
Is Expanded: The IsExpanded() member function returns true if the deskbar is +expanded and false if it is contracted. Note, the deskbar can only be contracted when in +left or right top position.
Set Location:
Set Location: The SetLocation() member function takes the same values returned +by the Location() member. The value passed in the first argument sets the position of the deskbar. +If the optional second argument is supplied, it is a boolean which indicates whether or not the +deskbar is expanded (true) or contracted (false). Note, the deskbar can only be contracted when in +left or right top position.
Expand:
Expand: The Expand() member function takes a single boolean argument which sets the +deskbar to expanded (true) or contracted (false) mode. Note, the deskbar can only be contracted +when in left or right top position.
Internally, the BDeskbar uses a BMessenger to communicate with the deskbar itself. The -actual messages used to perform its tasks will be documented here once they are determined. -The source code from the OpenTracker project will be used as a reference for this effort.
+Internally, the BDeskbar uses a BMessenger to communicate with the deskbar itself. +The source code from the OpenTracker project will be used as a reference for this effort. +You can find the deskbar source code here:
+ ++http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/opentracker/opentracker/deskbar/ ++ +
Specifically, the code which handles communicating with the BDeskbar class can be found +here:
+ ++http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/opentracker/opentracker/deskbar/BarWindow.cpp?rev=1.2&content-type=text/vnd.viewcvs-markup ++ +
The following describes the messages used to communicate between BDeskbar and the deskbar +itself.
+ + +The Frame() member sends a standard scripting message to get the frame from the deskbar. It +sends a B_GET_PROPERTY message to the deskbar asking for the "Frame" property specifying the +window by name. The window name is "Deskbar".
+ +The response from deskbar has a what code of B_REPLY and a BRect describing the frame in a +value called "result". This is standard BeOS scripting.
+ + +The Location() member sends the following message to the deskbar:
+ ++BMessage theMsg; +theMsg.what = 'gloc'; // This means get location ++ +
The deskbar responds with a message which looks like:
+ ++BMessage theMsg; +theMsg.what = 'rply'; // This means reply +theMsg.AddInt32("location", DeskbarLocation()); // This is the number which represents the location of the deskbar +theMsg.AddBool("expanded", Expanded()); // This is true if the deskbar is expanded, false otherwise ++ + +
The IsExpanded() member sends the following message to the deskbar:
+ ++BMessage theMsg; +theMsg.what = 'gexp'; // This means get expanded state ++ +
The deskbar responds with a message which looks like:
+ ++BMessage theMsg; +theMsg.what = 'rply'; // This means reply +theMsg.AddBool("expanded", Expanded()); // This is true if the deskbar is expanded, false otherwise ++ + +
The SetLocation() member sends the following message to the deskbar:
+ ++BMessage theMsg; +theMsg.what = 'sloc'; // This means set location +theMsg.AddInt32("location", newLocation); // This is the number which represents the location of the deskbar +theMsg.AddBool("expand", isExpanded); // This is true if the deskbar is expanded, false otherwise ++ +
The deskbar does not send a reply to this message.
+ + +The Expand() member sends the following message to the deskbar:
+ ++BMessage theMsg; +theMsg.what = 'sexp'; // This means set expanded state +theMsg.AddBool("expand", isExpanded); // This is true if the deskbar is expanded, false otherwise ++ +
The deskbar does not send a reply to this message.