TAILIEUCHUNG - Creating Applications with Mozilla-Chapter 3. XUL Elements and Features- P6

Tham khảo tài liệu 'creating applications with mozilla-chapter 3. xul elements and features- p6', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 3. XUL Elements and Features- P6 . Overlays An overlay is a separate file in which additional XUL content can be defined and loaded at runtime. Overlays are often used to define things like menus that appear in different components or parts of the application. If you are creating a large application or a UI with many elements as a part of your design the files can easily become large. The size in itself does not render it ineffective but it does make the job of the developer a little difficult when tracking down and changing features. The best way to overcome this size problem is to use overlays. Another reason to use overlays is to extract information from a certain logical portion of the UI and contain it in a file of its own. This extraction and containment promotes modularization and reusability. . How to Use Overlays The following declaration is the principal method for including reusable content in a XUL window. xul-overlay href chrome global content This declaration follows the same syntax as CSS processing instructions. Like other XML processing instructions it uses a at the beginning and end just inside the braces. The href attribute points to the overlay and uses Mozilla s chrome type URL. To insert content from an overlay use the same id of an element in the base file for a similar element in your overlay content and the overlay will replace the base file at runtime or be merged with it as described later in this chapter in the Section section . When the base element is empty it is replaced with the corresponding overlay element and any child subcontent. The following toolbar snippet shows a reference placed in a base file toolbar id main-toolbar When an overlay is read with the content below the previous line is replaced with that content toolbar id main-menubar persist collapsed toolbarbutton id new-button label New observes cmd_new toolbarbutton id open-button label Open observes cmd_open toolbarbutton id .

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.