Tài liệu Programming the Be Operating System-Chapter 8: Text ppt
... the Text- View project includes no text editing menu items and no text editing code, the selected text will be cut. 292 Chapter 8: Text You can deny the user the ability to edit text in the text ... that the top and bottom coordinates of the text area rectangle become unimportant as the user enters text that exceeds the size of the text area rectang...
Ngày tải lên: 26/01/2014, 07:20
... will be rectified in the balance of this book. Starting, in fact, with the next chapter. BeOS Programming Environment The programming tool you’ll be using to create your Be applications is the BeIDE. This ... during the execution of a program. An object can be added or deleted from the heap without regard for its placement in the heap, or for the other contents of...
Ngày tải lên: 26/01/2014, 07:20
... determined by the status of the Argv Only checkbox. While these two items appear grouped together in the Application Flags area, they aren’t related. Neither, either, or both can be checked at the same ... HelloApplication(); }; The source code file with the name of the project should hold the code for the implementation of the member functions of the application class...
Ngày tải lên: 26/01/2014, 07:20
Tài liệu Programming the Be Operating System-Chapter 3: BeOS API Overview doc
... data members in Be classes. If a Be class does define data members, they are usually defined to be private rather than public. These private data members will be used within class member functions, ... version of the MyHelloWorld project the version just described. The Alert folder also holds a version of the MyHelloWorld project. The only difference between the two project...
Ngày tải lên: 26/01/2014, 07:20
Tài liệu Programming the Be Operating System-Chapter 4: Windows, Views, and Messages doc
... AddChild(fMyView); BFont theFont = be_ plain_font; int32 theSize = 12; SetHelloViewFont(theFont, theSize); Show(); } The call to SetHelloViewFont() results in the about-to -be shown window hav- ing text characteristics ... altered—as they are here with the writing of the string “Quitting ” the view needs to be updated before the changes become visible onscreen. If the c...
Ngày tải lên: 26/01/2014, 07:20
Tài liệu Programming the Be Operating System-Chapter 5: Drawing ppt
... be to pre- serve the current state of the view before changing its high color. As implemented (here and in the previous section), the text the program draws is drawn in black the first time the ... 10.0); The call to MovePenTo() moves the pen to the location 30 pixels from the left of the view and 40 pixels from the top of the view. That places the pen at th...
Ngày tải lên: 26/01/2014, 07:20
Tài liệu Programming the Be Operating System-Chapter 6: Controls and Messages ppt
... *buttonBeep1Name = "Beep1"; const char *buttonBeep2Name = "Beep2"; const char *buttonBeep1Label = "Beep One"; const char *buttonBeep2Label = "Beep Two"; In the ... accommodate the height of the text of the button’s label and the border of the button. If the values of the frame rectangle coordinates result in a button that isn’t high en...
Ngày tải lên: 26/01/2014, 07:20
Tài liệu Programming the Be Operating System-Chapter 7: Menus docx
... to determine the item’s current label before changing it to a new string. The type of label-changing shown in the above snippet is a good candidate for the use of both Label() and SetLabel(). If the user ... BUTTON_BEEP_MSG: beep(); break; case MENU_BEEP_1_MSG: beep(); break; default: BWindow::MessageReceived(message); } } Because a click on the Beep One button and a selec...
Ngày tải lên: 26/01/2014, 07:20
Programming the Be Operating System-Chapter 9: Messages and Threads
... and the target of the message don’t have to be one and the same, they can be as shown in this snippet (read the Application-Defined Messages 357 identical to the version used in the Chapter 8 TextViewEdit ... the data to be added is of the MIME main type and subtype listed in the name parameter. For adding text, use text as the main type and plain as the subtype—...
Ngày tải lên: 17/10/2013, 19:15
Programming the Be Operating System-Chapter 10: Files
... the BTextView function Text( ). The number of bytes the text occupies can be obtained from the BTextView func- tion TextLength(). After writing the data to the file, call the POSIX file function fclose(): ... write the window’s data. The POSIX file func- tion fwrite() can be used for that job. The data to write is the text of the win- dow’s text view. That...
Ngày tải lên: 20/10/2013, 10:15