TAILIEUCHUNG - Programming the Be Operating System-Chapter 8: Text

Tham khảo tài liệu 'programming the be operating system-chapter 8: text', công nghệ thông tin, hệ điều hành phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 8 In this chapter Fonts Simple Text Editable Text Scrolling Text The BeOS makes it simple to display text in a view you ve seen several examples of calling the BView functions SetFont and DrawString to specify which font a view should use and then draw a line of text. This approach works fine for small amounts of plain text your application however is more likely to be rich in both graphics and text so you ll want to take advantage of the BFont BStringView BTextView BScrollBar and BScrollView classes. The BFont class creates objects that define the characteristics of fonts. You create a BFont object based on an existing font then alter any of several characteristics. The BeOS is quite adept at manipulating fonts. You can alter basic font features such as size and spacing but you can also easily change other more esoteric font characteristics such as shear and angle of rotation. You can use this new font in subsequent calls to DrawString or as the font in which text is displayed in BStringView BTextView or BScrollView objects. A BStringView object displays a line of text as a call to the BView function DrawString does. Because the text of a BStringView exists as an object this text knows how to update itself something that the text produced by a call to DrawString doesn t know how to do. More powerful than the BStringView class is the BTextView class. A BTextView object is used to display small or large amounts of editable text. The user can perform standard editing techniques such as cut copy and paste on the text of a BTextView object. And the user or the program itself can alter the font or font color of some or all of the text in such an object. If the text of a BTextView object extends beyond the content area of the object a scrollbar simplifies the user s viewing. The BScrollBar class lets you add a scrollbar to a BTextView. Before adding that scrollbar though you should consider 272 Fonts 273 creating a BScrollView object. As its name implies such an object .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.