TAILIEUCHUNG - Apress Pro PHP-GTK phần 3

ATK làm cho nó có thể cho khiếm thị hoặc khuyết tật người dùng nhận được nhiều nhất của một ứng dụng GTK dựa trên. Một vài phụ thuộc khác tồn tại, nhưng đại đa số các bản phân phối Linux sẽ có những tập tin cài đặt. Tuy nhiên, một số có thể mất khỏi hệ thống của bạn. Đối với tất cả các gói, bao gồm GTK, nguồn là tự do sẵn có, và quá trình cài đặt là khá giống nhau. Nếu bạn cần phải cài đặt bất kỳ phụ thuộc, bạn. | 58 CHAPTER 4 HANDLING EVENTS AND SIGNALS click you are actually clicking the event box. You have basically put the button behind a glass case. You can see it but you can t touch it. Note Listing 4-8 is just an example. In a real application there would be no reason to put a GtkLabel inside a GtkEventBox just to achieve a mouse-over effect. Chapter 16 shows a more appropriate method for achieving a mouse-over effect. Because putting a widget inside an event box basically cuts it off from the user it may not always be the best solution. Sometimes you need to keep the responsiveness of a widget. Also a GtkEventBox does not automatically listen for some events. Adding Events to a Widget A vast majority of the times a widget is used in an application it already listens for all of the signals that it will need. However you may need to add another event to the set of events that will cause a widget to react to the user. You have seen that using an event box can add functionality to a widget but that it also blocks off the widget from the user. If a widget needs to listen for a new set of events and retain its current level of responsiveness you can add new events with the add_events method. add_events will make the widget listen for new signals generated by the events that are passed to it. Before adding events to a widget you should know which events the widget already listens for. Signal reflection knowing which signals a widget listens for by default is one of the built-in features of PHP-GTK. Because signals are not part of PHP proper the reflection class is not able to grab or display them. Therefore PHP-GTK must handle this on its own. The signal_list_ids and signal_list_names methods list the IDs and names respectively of the signals that a widget listens for immediately after it is constructed. These methods expect either a class name or a class instance as the only parameter. Each returns an array of the signal data. Both methods are defined by the GObject class

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.