GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

widget.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2002-2004 The GFC Development Team. 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00024 00025 #ifndef GFC_GTK_WIDGET_HH 00026 #define GFC_GTK_WIDGET_HH 00027 00028 #ifndef GFC_ATK_IMPLEMENTOR_HH 00029 #include <gfc/atk/implementor.hh> 00030 #endif 00031 00032 #ifndef GFC_GTK_ADJUSTMENT_HH 00033 #include <gfc/gtk/adjustment.hh> 00034 #endif 00035 00036 #ifndef GFC_GTK_ENUMS_HH 00037 #include <gfc/gtk/enums.hh> 00038 #endif 00039 00040 #ifndef GFC_GDK_EVENTS_HH 00041 #include <gfc/gdk/events.hh> 00042 #endif 00043 00044 #ifndef GFC_GTK_SELECTION_HH 00045 #include <gfc/gtk/selection.hh> 00046 #endif 00047 00048 namespace GFC { 00049 00050 namespace Atk { 00051 class Object; 00052 } 00053 00054 namespace Gdk { 00055 class Bitmap; 00056 class Color; 00057 class Colormap; 00058 class Cursor; 00059 class Display; 00060 class Event; 00061 class Pixbuf; 00062 class Region; 00063 class Screen; 00064 class Visual; 00065 class Window; 00066 } 00067 00068 namespace G { 00069 class Value; 00070 } 00071 00072 namespace Pango { 00073 class Context; 00074 class FontDescription; 00075 class Layout; 00076 } 00077 00078 namespace Gtk { 00079 00080 class AccelGroup; 00081 class AccelKey; 00082 class Clipboard; 00083 class Container; 00084 class RcStyle; 00085 class Selection; 00086 class Settings; 00087 class StockId; 00088 class Style; 00089 00092 00093 enum WidgetFlags 00094 { 00095 TOP_LEVEL = GTK_TOPLEVEL, 00099 00100 NO_WINDOW = GTK_NO_WINDOW, 00104 00105 REALIZED = GTK_REALIZED, 00107 00108 MAPPED = GTK_MAPPED, 00111 00112 VISIBLE = GTK_VISIBLE, 00115 00116 SENSITIVE = GTK_SENSITIVE, 00120 00121 PARENT_SENSITIVE = GTK_PARENT_SENSITIVE, 00126 00127 CAN_FOCUS = GTK_CAN_FOCUS, 00129 00130 HAS_FOCUS = GTK_HAS_FOCUS, 00133 00134 CAN_DEFAULT = GTK_CAN_DEFAULT, 00136 00137 HAS_DEFAULT = GTK_HAS_DEFAULT, 00139 00140 HAS_GRAB = GTK_HAS_GRAB, 00144 00145 RC_STYLE = GTK_RC_STYLE, 00148 00149 COMPOSITE_CHILD = GTK_COMPOSITE_CHILD, 00152 00153 NO_REPARENT = GTK_NO_REPARENT, 00155 00156 APP_PAINTABLE = GTK_APP_PAINTABLE, 00159 00160 RECEIVES_DEFAULT = GTK_RECEIVES_DEFAULT, 00163 00164 DOUBLE_BUFFERED = GTK_DOUBLE_BUFFERED, 00167 00168 NO_SHOW_ALL = GTK_NO_SHOW_ALL 00171 }; 00172 00174 00175 typedef unsigned int WidgetFlagsField; 00176 00179 00180 enum WidgetHelpType 00181 { 00182 WIDGET_HELP_TOOLTIP = GTK_WIDGET_HELP_TOOLTIP, 00183 WIDGET_HELP_WHATS_THIS = GTK_WIDGET_HELP_WHATS_THIS 00184 }; 00185 00193 00194 class Allocation : public Gdk::Rectangle 00195 { 00196 public: 00199 00200 Allocation(); 00202 00203 Allocation(int x, int y, int width, int height); 00209 00213 00214 GtkAllocation* gtk_allocation() const; 00217 00219 }; 00220 00227 00228 class Requisition 00229 { 00230 GtkRequisition requisition_; 00231 00232 public: 00235 00236 Requisition(); 00238 00239 Requisition(int width, int height); 00243 00244 Requisition(const GtkRequisition& requisition); 00247 00251 00252 GtkRequisition* gtk_requisition() const; 00254 00255 operator GtkRequisition* () const; 00257 00258 int width() const; 00260 00261 int height() const; 00263 00264 bool operator==(const Requisition& other) const; 00267 00268 bool operator!=(const Requisition& other) const; 00271 00275 00276 void set(int width, int height); 00280 00282 }; 00283 00316 00317 class Widget : public Object, public Atk::Implementor 00318 { 00319 friend class G::Object; 00320 00321 Widget(const Widget&); 00322 Widget& operator=(const Widget&); 00323 00324 protected: 00327 00328 Widget(); 00330 00331 explicit Widget(GtkWidget *widget, bool owns_reference = false); 00338 00342 00343 void set_allocation(const Allocation& allocation); 00349 00350 void set_window(const Gdk::Window& window); 00359 00363 00364 typedef G::Signal<void> ShowSignalType; 00365 typedef G::SignalProxy<TypeInstance, ShowSignalType> ShowSignalProxy; 00366 static const ShowSignalType show_signal; 00371 00372 typedef G::Signal<void> HideSignalType; 00373 typedef G::SignalProxy<TypeInstance, HideSignalType> HideSignalProxy; 00374 static const HideSignalType hide_signal; 00379 00380 typedef G::Signal<void> MapSignalType; 00381 typedef G::SignalProxy<TypeInstance, MapSignalType> MapSignalProxy; 00382 static const MapSignalType map_signal; 00387 00388 typedef G::Signal<void> UnmapSignalType; 00389 typedef G::SignalProxy<TypeInstance, UnmapSignalType> UnmapSignalProxy; 00390 static const UnmapSignalType unmap_signal; 00395 00396 typedef G::Signal<void> RealizeSignalType; 00397 typedef G::SignalProxy<TypeInstance, RealizeSignalType> RealizeSignalProxy; 00398 static const RealizeSignalType realize_signal; 00403 00404 typedef G::Signal<void> UnrealizeSignalType; 00405 typedef G::SignalProxy<TypeInstance, UnrealizeSignalType> UnrealizeSignalProxy; 00406 static const UnrealizeSignalType unrealize_signal; 00411 00412 typedef G::Signal<void, Requisition*> SizeRequestSignalType; 00413 typedef G::SignalProxy<TypeInstance, SizeRequestSignalType> SizeRequestSignalProxy; 00414 static const SizeRequestSignalType size_request_signal; 00420 00421 typedef G::Signal<void, const Allocation&> SizeAllocateSignalType; 00422 typedef G::SignalProxy<TypeInstance, SizeAllocateSignalType> SizeAllocateSignalProxy; 00423 static const SizeAllocateSignalType size_allocate_signal; 00429 00430 typedef G::Signal<void, StateType> StateChangedSignalType; 00431 typedef G::SignalProxy<TypeInstance, StateChangedSignalType> StateChangedSignalProxy; 00432 static const StateChangedSignalType state_changed_signal; 00438 00439 typedef G::Signal<void, Widget*> ParentSetSignalType; 00440 typedef G::SignalProxy<TypeInstance, ParentSetSignalType> ParentSetSignalProxy; 00441 static const ParentSetSignalType parent_set_signal; 00447 00448 typedef G::Signal<void, Widget*> HierarchyChangedSignalType; 00449 typedef G::SignalProxy<TypeInstance, HierarchyChangedSignalType> HierarchyChangedSignalProxy; 00450 static const HierarchyChangedSignalType hierarchy_changed_signal; 00456 00457 typedef G::Signal<void, Style*> StyleSetSignalType; 00458 typedef G::SignalProxy<TypeInstance, StyleSetSignalType> StyleSetSignalProxy; 00459 static const StyleSetSignalType style_set_signal; 00465 00466 typedef G::Signal<void, TextDirection> DirectionChangedSignalType; 00467 typedef G::SignalProxy<TypeInstance, DirectionChangedSignalType> DirectionChangedSignalProxy; 00468 static const DirectionChangedSignalType direction_changed_signal; 00474 00475 typedef G::Signal<void, bool> GrabNotifySignalType; 00476 typedef G::SignalProxy<TypeInstance, GrabNotifySignalType> GrabNotifySignalProxy; 00477 static const GrabNotifySignalType grab_notify_signal; 00484 00485 typedef G::Signal<void, GParamSpec*> ChildNotifySignalType; 00486 typedef G::SignalProxy<TypeInstance, ChildNotifySignalType> ChildNotifySignalProxy; 00487 static const ChildNotifySignalType child_notify_signal; 00493 00494 typedef G::Signal<bool, bool> MnemonicActivateSignalType; 00495 typedef G::SignalProxy<TypeInstance, MnemonicActivateSignalType> MnemonicActivateSignalProxy; 00496 static const MnemonicActivateSignalType mnemonic_activate_signal; 00502 00503 typedef G::Signal<void> GrabFocusSignalType; 00504 typedef G::SignalProxy<TypeInstance, GrabFocusSignalType> GrabFocusSignalProxy; 00505 static const GrabFocusSignalType grab_focus_signal; 00510 00511 typedef G::Signal<bool, DirectionType> FocusSignalType; 00512 typedef G::SignalProxy<TypeInstance, FocusSignalType> FocusSignalProxy; 00513 static const FocusSignalType focus_signal; 00520 00521 typedef G::Signal<void> AccelClosuresChangedSignalType; 00522 typedef G::SignalProxy<TypeInstance, AccelClosuresChangedSignalType> AccelClosuresChangedSignalProxy; 00523 static const AccelClosuresChangedSignalType accel_closures_changed_signal; 00528 00529 typedef G::Signal<void, Gdk::Screen*> ScreenChangedSignalType; 00530 typedef G::SignalProxy<TypeInstance, ScreenChangedSignalType> ScreenChangedSignalProxy; 00531 static const ScreenChangedSignalType screen_changed_signal; 00537 00538 typedef G::Signal<bool, unsigned int> CanActivateAccelSignalType; 00539 typedef G::SignalProxy<TypeInstance, CanActivateAccelSignalType> CanActivateAccelSignalProxy; 00540 static const CanActivateAccelSignalType can_activate_accel_signal; 00547 00551 00552 typedef G::Signal<void, SelectionData&, unsigned int, unsigned int> SelectionGetSignalType; 00553 typedef G::SignalProxy<TypeInstance, SelectionGetSignalType> SelectionGetSignalProxy; 00554 static const SelectionGetSignalType selection_get_signal; 00562 00563 typedef G::Signal<void, const SelectionData&, unsigned int> SelectionReceivedSignalType; 00564 typedef G::SignalProxy<TypeInstance, SelectionReceivedSignalType> SelectionReceivedSignalProxy; 00565 static const SelectionReceivedSignalType selection_received_signal; 00572 00576 00577 typedef G::Signal<void, DragContext&> DragBeginSignalType; 00578 typedef G::SignalProxy<TypeInstance, DragBeginSignalType> DragBeginSignalProxy; 00579 static const DragBeginSignalType drag_begin_signal; 00585 00586 typedef G::Signal<void, DragContext&> DragEndSignalType; 00587 typedef G::SignalProxy<TypeInstance, DragEndSignalType> DragEndSignalProxy; 00588 static const DragEndSignalType drag_end_signal; 00594 00595 typedef G::Signal<void, DragContext&, SelectionData&, unsigned int, unsigned int> DragDataGetSignalType; 00596 typedef G::SignalProxy<TypeInstance, DragDataGetSignalType> DragDataGetSignalProxy; 00597 static const DragDataGetSignalType drag_data_get_signal; 00606 00607 typedef G::Signal<void, DragContext&> DragDataDeleteSignalType; 00608 typedef G::SignalProxy<TypeInstance, DragDataDeleteSignalType> DragDataDeleteSignalProxy; 00609 static const DragDataDeleteSignalType drag_data_delete_signal; 00615 00619 00620 typedef G::Signal<void, DragContext&, unsigned int> DragLeaveSignalType; 00621 typedef G::SignalProxy<TypeInstance, DragLeaveSignalType> DragLeaveSignalProxy; 00622 static const DragLeaveSignalType drag_leave_signal; 00629 00630 typedef G::Signal<bool, DragContext&, int, int, unsigned int> DragMotionSignalType; 00631 typedef G::SignalProxy<TypeInstance, DragMotionSignalType> DragMotionSignalProxy; 00632 static const DragMotionSignalType drag_motion_signal; 00642 00643 typedef G::Signal<bool, DragContext&, int, int, unsigned int> DragDropSignalType; 00644 typedef G::SignalProxy<TypeInstance, DragDropSignalType> DragDropSignalProxy; 00645 static const DragDropSignalType drag_drop_signal; 00655 00656 typedef G::Signal<void, DragContext&, int, int, const SelectionData&, unsigned int, unsigned int> DragDataReceivedSignalType; 00657 typedef G::SignalProxy<TypeInstance, DragDataReceivedSignalType> DragDataReceivedSignalProxy; 00658 static const DragDataReceivedSignalType drag_data_received_signal; 00669 00673 00674 typedef G::Signal<bool, const Gdk::Event&> EventSignalType; 00675 typedef G::SignalProxy<TypeInstance, EventSignalType> EventSignalProxy; 00676 static const EventSignalType event_signal; 00683 00684 typedef G::Signal<void, const Gdk::Event&> EventAfterSignalType; 00685 typedef G::SignalProxy<TypeInstance, EventAfterSignalType> EventAfterSignalProxy; 00686 static const EventAfterSignalType event_after_signal; 00692 00693 typedef G::Signal<bool, const Gdk::EventButton&> ButtonPressEventSignalType; 00694 typedef G::SignalProxy<TypeInstance, ButtonPressEventSignalType> ButtonPressEventSignalProxy; 00695 static const ButtonPressEventSignalType button_press_event_signal; 00702 00703 typedef G::Signal<bool, const Gdk::EventButton&> ButtonReleaseEventSignalType; 00704 typedef G::SignalProxy<TypeInstance, ButtonReleaseEventSignalType> ButtonReleaseEventSignalProxy; 00705 static const ButtonReleaseEventSignalType button_release_event_signal; 00712 00713 typedef G::Signal<bool, const Gdk::EventScroll&> ScrollEventSignalType; 00714 typedef G::SignalProxy<TypeInstance, ScrollEventSignalType> ScrollEventSignalProxy; 00715 static const ScrollEventSignalType scroll_event_signal; 00722 00723 typedef G::Signal<bool, const Gdk::EventMotion&> MotionNotifyEventSignalType; 00724 typedef G::SignalProxy<TypeInstance, MotionNotifyEventSignalType> MotionNotifyEventSignalProxy; 00725 static const MotionNotifyEventSignalType motion_notify_event_signal; 00732 00733 typedef G::Signal<bool, const Gdk::EventAny&> DeleteEventSignalType; 00734 typedef G::SignalProxy<TypeInstance, DeleteEventSignalType> DeleteEventSignalProxy; 00735 static const DeleteEventSignalType delete_event_signal; 00742 00743 typedef G::Signal<bool, const Gdk::EventAny&> DestroyEventSignalType; 00744 typedef G::SignalProxy<TypeInstance, DestroyEventSignalType> DestroyEventSignalProxy; 00745 static const DestroyEventSignalType destroy_event_signal; 00752 00753 typedef G::Signal<bool, const Gdk::EventExpose&> ExposeEventSignalType; 00754 typedef G::SignalProxy<TypeInstance, ExposeEventSignalType> ExposeEventSignalProxy; 00755 static const ExposeEventSignalType expose_event_signal; 00762 00763 typedef G::Signal<bool, const Gdk::EventKey&> KeyPressEventSignalType; 00764 typedef G::SignalProxy<TypeInstance, KeyPressEventSignalType> KeyPressEventSignalProxy; 00765 static const KeyPressEventSignalType key_press_event_signal; 00772 00773 typedef G::Signal<bool, const Gdk::EventKey&> KeyReleaseEventSignalType; 00774 typedef G::SignalProxy<TypeInstance, KeyReleaseEventSignalType> KeyReleaseEventSignalProxy; 00775 static const KeyReleaseEventSignalType key_release_event_signal; 00782 00783 typedef G::Signal<bool, const Gdk::EventCrossing&> EnterNotifyEventSignalType; 00784 typedef G::SignalProxy<TypeInstance, EnterNotifyEventSignalType> EnterNotifyEventSignalProxy; 00785 static const EnterNotifyEventSignalType enter_notify_event_signal; 00790 00791 typedef G::Signal<bool, const Gdk::EventCrossing&> LeaveNotifyEventSignalType; 00792 typedef G::SignalProxy<TypeInstance, LeaveNotifyEventSignalType> LeaveNotifyEventSignalProxy; 00793 static const LeaveNotifyEventSignalType leave_notify_event_signal; 00800 00801 typedef G::Signal<bool, const Gdk::EventConfigure&> ConfigureEventSignalType; 00802 typedef G::SignalProxy<TypeInstance, ConfigureEventSignalType> ConfigureEventSignalProxy; 00803 static const ConfigureEventSignalType configure_event_signal; 00810 00811 typedef G::Signal<bool, const Gdk::EventFocus&> FocusInEventSignalType; 00812 typedef G::SignalProxy<TypeInstance, FocusInEventSignalType> FocusInEventSignalProxy; 00813 static const FocusInEventSignalType focus_in_event_signal; 00820 00821 typedef G::Signal<bool, const Gdk::EventFocus&> FocusOutEventSignalType; 00822 typedef G::SignalProxy<TypeInstance, FocusOutEventSignalType> FocusOutEventSignalProxy; 00823 static const FocusOutEventSignalType focus_out_event_signal; 00830 00831 typedef G::Signal<bool, const Gdk::EventAny&> MapEventSignalType; 00832 typedef G::SignalProxy<TypeInstance, MapEventSignalType> MapEventSignalProxy; 00833 static const MapEventSignalType map_event_signal; 00840 00841 typedef G::Signal<bool, const Gdk::EventAny&> UnmapEventSignalType; 00842 typedef G::SignalProxy<TypeInstance, UnmapEventSignalType> UnmapEventSignalProxy; 00843 static const UnmapEventSignalType unmap_event_signal; 00850 00851 typedef G::Signal<bool, const Gdk::EventProperty&> PropertyNotifyEventSignalType; 00852 typedef G::SignalProxy<TypeInstance, PropertyNotifyEventSignalType> PropertyNotifyEventSignalProxy; 00853 static const PropertyNotifyEventSignalType property_notify_event_signal; 00860 00861 typedef G::Signal<bool, const Gdk::EventSelection&> SelectionClearEventSignalType; 00862 typedef G::SignalProxy<TypeInstance, SelectionClearEventSignalType> SelectionClearEventSignalProxy; 00863 static const SelectionClearEventSignalType selection_clear_event_signal; 00870 00871 typedef G::Signal<bool, const Gdk::EventSelection&> SelectionRequestEventSignalType; 00872 typedef G::SignalProxy<TypeInstance, SelectionRequestEventSignalType> SelectionRequestEventSignalProxy; 00873 static const SelectionRequestEventSignalType selection_request_event_signal; 00880 00881 typedef G::Signal<bool, const Gdk::EventSelection&> SelectionNotifyEventSignalType; 00882 typedef G::SignalProxy<TypeInstance, SelectionNotifyEventSignalType> SelectionNotifyEventSignalProxy; 00883 static const SelectionNotifyEventSignalType selection_notify_event_signal; 00890 00891 typedef G::Signal<bool, const Gdk::EventProximity&> ProximityInEventSignalType; 00892 typedef G::SignalProxy<TypeInstance, ProximityInEventSignalType> ProximityInEventSignalProxy; 00893 static const ProximityInEventSignalType proximity_in_event_signal; 00900 00901 typedef G::Signal<bool, const Gdk::EventProximity&> ProximityOutEventSignalType; 00902 typedef G::SignalProxy<TypeInstance, ProximityOutEventSignalType> ProximityOutEventSignalProxy; 00903 static const ProximityOutEventSignalType proximity_out_event_signal; 00910 00911 typedef G::Signal<bool, const Gdk::EventVisibility&> VisibilityNotifyEventSignalType; 00912 typedef G::SignalProxy<TypeInstance, VisibilityNotifyEventSignalType> VisibilityNotifyEventSignalProxy; 00913 static const VisibilityNotifyEventSignalType visibility_notify_event_signal; 00920 00921 typedef G::Signal<bool, const Gdk::EventClient&> ClientEventSignalType; 00922 typedef G::SignalProxy<TypeInstance, ClientEventSignalType> ClientEventSignalProxy; 00923 static const ClientEventSignalType client_event_signal; 00930 00931 typedef G::Signal<bool, const Gdk::EventAny&> NoExposeEventSignalType; 00932 typedef G::SignalProxy<TypeInstance, NoExposeEventSignalType> NoExposeEventSignalProxy; 00933 static const NoExposeEventSignalType no_expose_event_signal; 00940 00941 typedef G::Signal<bool, const Gdk::EventWindowState&> WindowStateEventSignalType; 00942 typedef G::SignalProxy<TypeInstance, WindowStateEventSignalType> WindowStateEventSignalProxy; 00943 static const WindowStateEventSignalType window_state_event_signal; 00950 00952 00953 public: 00956 00957 virtual ~Widget(); 00959 00963 00964 GtkWidget* gtk_widget() const; 00966 00967 operator GtkWidget* () const; 00969 00970 bool is_toplevel() const; 00972 00973 bool has_no_window() const; 00975 00976 bool is_realized() const; 00978 00979 bool is_mapped() const; 00981 00982 bool is_visible() const; 00984 00985 bool is_drawable() const; 00987 00988 bool sensitive() const; 00990 00991 bool parent_sensitive() const; 00993 00994 bool is_sensitive() const; 00996 00997 bool can_focus() const; 00999 01000 bool has_focus() const; 01002 01003 bool can_default() const; 01005 01006 bool has_default() const; 01008 01009 bool has_grab() const; 01012 01013 bool has_rc_style() const; 01015 01016 bool is_composite_child() const; 01018 01019 bool is_app_paintable() const; 01021 01022 bool receives_default() const; 01025 01026 bool is_double_buffered() const; 01028 01029 bool get_no_show_all() const; 01033 01034 StateType get_state() const; 01036 01037 const Allocation& get_allocation() const; 01039 01040 Requisition get_child_requisition() const; 01043 01044 void get_child_requisition(Requisition& requisition) const; 01057 01058 Gdk::Window* get_window() const; 01061 01062 bool is_focus() const; 01068 01069 String get_name() const; 01072 01073 bool get_child_visible() const; 01079 01080 Widget* get_parent() const; 01082 01083 Gdk::Window* get_parent_window() const; 01085 01086 void get_size_request(int *width, int *height) const; 01095 01096 Gdk::ExtensionMode get_extension_events() const; 01098 01099 Widget* get_toplevel() const; 01118 01119 Widget* get_ancestor(GType widget_type) const; 01127 01128 Gdk::Colormap* get_colormap() const; 01131 01132 const Gdk::Visual* get_visual() const; 01134 01135 Gdk::Screen* get_screen() const; 01143 01144 bool has_screen() const; 01150 01151 Gdk::Display* get_display() const; 01159 01160 Gdk::Window* get_root_window() const; 01168 01169 Settings* get_settings() const; 01176 01177 Clipboard* get_clipboard(Gdk::Atom selection = GDK_SELECTION_CLIPBOARD) const; 01188 01189 Atk::Object* get_accessible() const; 01191 01192 Gdk::EventMaskField get_events() const; 01197 01198 void get_pointer(int *x, int *y) const; 01207 01208 Gdk::Point get_pointer() const; 01216 01217 bool is_ancestor(Widget *ancestor) const; 01222 01223 Style* get_style() const; 01225 01226 Style* rc_get_style() const; 01233 01234 RcStyle* get_modifier_style() const; 01245 01246 String get_composite_name() const; 01249 01250 Pango::Context* get_pango_context() const; 01259 01260 TextDirection get_direction() const; 01262 01263 void style_get_property(const char *property_name, G::Value& value); 01264 void style_get_property(const String& property_name, G::Value& value); 01268 01269 void path(String& path, String& path_reversed) const; 01282 01283 void class_path(String& path, String& path_reversed) const; 01288 01292 01293 void set_flags(WidgetFlagsField flags); 01296 01297 void unset_flags(WidgetFlagsField flags); 01300 01301 void unparent(); 01304 01305 void show(); 01314 01315 void show(bool visible); 01321 01322 void hide(); 01324 01325 void show_now(); 01330 01331 void show_all(); 01333 01334 void hide_all(); 01336 01337 void set_no_show_all(bool no_show_all); 01344 01345 void map(); 01348 01349 void unmap(); 01352 01353 void realize(); 01367 01368 void unrealize(); 01371 01372 void queue_draw(); 01374 01375 void queue_draw_area(int x, int y, int width, int height); 01397 01398 void queue_draw_area(const Gdk::Rectangle& rectangle); 01402 01403 void queue_resize(); 01408 01409 void queue_resize_no_redraw(); 01411 01412 void size_request(Requisition *requisition); 01424 01425 void size_allocate(const Allocation& allocation); 01429 01430 void add_accelerator(const char *accel_signal, AccelGroup& accel_group, const AccelKey& accel_key); 01431 void add_accelerator(const String& accel_signal, AccelGroup& accel_group, const AccelKey& accel_key); 01442 01443 bool remove_accelerator(AccelGroup& accel_group, const AccelKey& accel_key); 01448 01449 void set_accel_path(const char *accel_path, AccelGroup& accel_group); 01450 void set_accel_path(const String& accel_path, AccelGroup& accel_group); 01465 01466 bool list_accel_closures(std::vector<GClosure*>& closures); 01475 01476 bool can_activate_accel(unsigned int signal_id); 01486 01487 bool can_activate_accel(const char *signal_name); 01488 bool can_activate_accel(const String& signal_name); 01493 01494 int send_expose(const Gdk::EventExpose& event); 01506 01507 bool mnemonic_activate(bool group_cycling); 01511 01512 bool event(const Gdk::Event& event); 01522 01523 bool activate(); 01530 01531 bool set_scroll_adjustments(Adjustment *hadjustment, Adjustment *vadjustment); 01541 01542 void reparent(Widget& new_parent); 01546 01547 bool intersect(const Gdk::Rectangle& area, Gdk::Rectangle *intersection); 01555 01556 Gdk::Rectangle intersect(const Gdk::Rectangle& area); 01564 01565 Pointer<Gdk::Region> intersect(Gdk::Region& region); 01577 01578 void freeze_child_notify(); 01581 01582 void child_notify(const char *child_property); 01583 void child_notify(const String& child_property); 01586 01587 void thaw_child_notify(); 01590 01591 void grab_focus(); 01595 01596 void grab_default(); 01601 01602 void set_name(const char *name); 01603 void set_name(const String& name); 01609 01610 void set_state(StateType state); 01615 01616 void set_sensitive(bool sensitive); 01623 01624 void set_app_paintable(bool app_paintable); 01630 01631 void set_double_buffered(bool double_buffered); 01643 01644 void set_redraw_on_allocate(bool redraw_on_allocate); 01658 01659 void set_parent(Widget& parent); 01666 01667 void set_parent_window(Gdk::Window *parent_window); 01670 01671 void set_child_visible(bool is_visible); 01686 01687 bool child_focus(DirectionType direction); 01707 01708 void set_size_request(int width, int height); 01732 01733 void set_events(Gdk::EventMaskField events); 01744 01745 void add_events(Gdk::EventMaskField events); 01748 01749 void set_extension_events(Gdk::ExtensionMode mode); 01753 01754 void set_colormap(Gdk::Colormap& colormap); 01760 01761 bool translate_coordinates(Widget &src_widget, int src_x, int src_y, int *dest_x, int *dest_y) const; 01773 01774 void set_style(Style& style); 01781 01782 void ensure_style(); 01786 01787 void modify_style(RcStyle& style); 01803 01804 void modify_fg(StateType state, const Gdk::Color* color); 01811 01812 void modify_bg(StateType state, const Gdk::Color *color); 01819 01820 void modify_text(StateType state, const Gdk::Color *color); 01829 01830 void modify_base(StateType state, const Gdk::Color *color); 01839 01840 void modify_font(const Pango::FontDescription *font_desc); 01846 01847 Pointer<Pango::Context> create_pango_context(); 01851 01852 Pointer<Pango::Layout> create_pango_layout(const char *text); 01853 Pointer<Pango::Layout> create_pango_layout(const String& text); 01863 01864 Pointer<Gdk::Pixbuf> render_icon(const StockId& stock_id, IconSize size, const char *detail = 0); 01878 01879 void set_composite_name(const char *name); 01880 void set_composite_name(const String& name); 01885 01886 void reset_rc_styles(); 01890 01891 void set_direction(TextDirection dir); 01904 01905 void shape_combine_mask(const Gdk::Bitmap& shape_mask, int offset_x, int offset_y); 01913 01914 void shape_combine_mask(); 01916 01917 bool list_mnemonic_labels(std::vector<Widget*>& widgets); 01926 01927 void add_mnemonic_label(Widget& label); 01936 01937 void remove_mnemonic_label(Widget& label); 01944 01946 01947 static const Style* get_default_style(); 01951 01952 static Gdk::Colormap* get_default_colormap(); 01954 01955 static const Gdk::Visual* get_default_visual(); 01958 01959 static TextDirection get_default_direction(); 01961 01962 static void push_colormap(Gdk::Colormap& cmap); 01968 01969 static void push_composite_child(); 01974 01975 static void pop_composite_child(); 01977 01978 static void pop_colormap(); 01980 01981 static void set_default_colormap(Gdk::Colormap *colormap); 01987 01988 static void set_default_direction(TextDirection dir); 01992 01995 01996 Gdk::GrabStatus keyboard_grab(bool owner_events = false, unsigned int time = GDK_CURRENT_TIME); 02009 02010 Gdk::GrabStatus pointer_grab(Gdk::EventMaskField event_mask, Widget *confine_to = 0, Gdk::Cursor *cursor = 0, 02011 bool owner_events = false, unsigned int time = GDK_CURRENT_TIME); 02039 02043 02044 bool selection_owner_get(Gdk::Atom selection); 02048 02049 bool selection_owner_set(Gdk::Atom selection, unsigned int time, const Gdk::Display *display = 0); 02055 02056 void selection_add_target(Gdk::Atom selection, Gdk::Atom target, unsigned int info); 02061 02062 void selection_add_target(Gdk::Atom selection, const TargetEntry& entry); 02066 02067 void selection_add_targets(Gdk::Atom selection, const std::vector<TargetEntry>& targets); 02072 02073 void selection_clear_targets(Gdk::Atom selection); 02076 02077 bool selection_convert(Gdk::Atom selection, Gdk::Atom target, unsigned int time = GDK_CURRENT_TIME); 02086 02087 void selection_remove_all(); 02090 02092 02093 static bool selection_owner_unset(Gdk::Atom selection, unsigned int time, const Gdk::Display *display = 0); 02099 02102 02103 void drag_get_data(DragContext& context, Gdk::Atom target, unsigned int time = GDK_CURRENT_TIME); 02115 02116 void drag_highlight(); 02119 02120 void drag_unhighlight(); 02122 02123 void drag_dest_set(DestDefaultsField flags, const TargetEntry& target, Gdk::DragActionField actions); 02132 02133 void drag_dest_set(DestDefaultsField flags, const std::vector<TargetEntry>& targets, Gdk::DragActionField actions); 02142 02143 void drag_dest_set_proxy(Gdk::Window *proxy_window, Gdk::DragProtocol protocol, bool use_coordinates); 02150 02151 void drag_dest_unset(); 02154 02155 Gdk::Atom drag_dest_find_target(const DragContext& context, const TargetList *target_list = 0); 02166 02167 Pointer<TargetList> drag_dest_get_target_list() const; 02170 02171 void drag_dest_set_target_list(TargetList *target_list); 02176 02180 02181 DragContext* drag_source_begin(const TargetList& targets, Gdk::DragActionField actions, int button, const Gdk::Event& event); 02191 02192 void drag_source_set(Gdk::ModifierTypeField start_button_mask, const TargetEntry& target, Gdk::DragActionField actions); 02198 02199 void drag_source_set(Gdk::ModifierTypeField start_button_mask, const std::vector<TargetEntry>& targets, Gdk::DragActionField actions); 02205 02206 void drag_source_unset(); 02208 02209 Pointer<TargetList> drag_source_get_target_list() const; 02212 02213 void drag_source_set_target_list(TargetList *target_list); 02218 02219 void drag_source_set_icon(Gdk::Colormap *colormap, Gdk::Pixmap *pixmap, Gdk::Bitmap *mask); 02227 02228 void drag_source_set_icon_pixbuf(Gdk::Pixbuf& pixbuf); 02233 02234 void drag_source_set_icon_stock(const StockId& stock_id); 02237 02238 bool drag_check_threshold(int start_x, int start_y, int current_x, int current_y); 02247 02251 02252 const ShowSignalProxy sig_show(); 02254 02255 const HideSignalProxy sig_hide(); 02257 02258 const MapSignalProxy sig_map(); 02260 02261 const UnmapSignalProxy sig_unmap(); 02263 02264 const RealizeSignalProxy sig_realize(); 02266 02267 const UnrealizeSignalProxy sig_unrealize(); 02269 02270 const SizeRequestSignalProxy sig_size_request(); 02272 02273 const SizeAllocateSignalProxy sig_size_allocate(); 02275 02276 const StateChangedSignalProxy sig_state_changed(); 02278 02279 const ParentSetSignalProxy sig_parent_set(); 02281 02282 const HierarchyChangedSignalProxy sig_hierarchy_changed(); 02286 02287 const StyleSetSignalProxy sig_style_set(); 02289 02290 const DirectionChangedSignalProxy sig_direction_changed(); 02293 02294 const GrabNotifySignalProxy sig_grab_notify(); 02297 02298 const ChildNotifySignalProxy sig_child_notify(const char *property_name = 0); 02299 const ChildNotifySignalProxy sig_child_notify(const String& property_name); 02307 02308 const MnemonicActivateSignalProxy sig_mnemonic_activate(); 02311 02312 const GrabFocusSignalProxy sig_grab_focus(); 02315 02316 const FocusSignalProxy sig_focus(); 02319 02320 const AccelClosuresChangedSignalProxy sig_accel_closures_changed(); 02324 02325 const ScreenChangedSignalProxy sig_screen_changed(); 02328 02329 const CanActivateAccelSignalProxy sig_can_activate_accel(); 02332 02336 02337 const SelectionGetSignalProxy sig_selection_get(); 02340 02341 const SelectionReceivedSignalProxy sig_selection_received(); 02344 02348 02349 const DragBeginSignalProxy sig_drag_begin(); 02353 02354 const DragEndSignalProxy sig_drag_end(); 02357 02358 const DragDataGetSignalProxy sig_drag_data_get(); 02364 02365 const DragDataDeleteSignalProxy sig_drag_data_delete(); 02368 02372 02373 const DragLeaveSignalProxy sig_drag_leave(); 02377 02378 const DragMotionSignalProxy sig_drag_motion(); 02394 02395 const DragDropSignalProxy sig_drag_drop(); 02404 02405 const DragDataReceivedSignalProxy sig_drag_data_received(); 02417 02421 02422 const EventSignalProxy sig_event(); 02424 02425 const EventAfterSignalProxy sig_event_after(); 02428 02429 const ButtonPressEventSignalProxy sig_button_press_event(); 02431 02432 const ButtonReleaseEventSignalProxy sig_button_release_event(); 02434 02435 const ScrollEventSignalProxy sig_scroll_event(); 02437 02438 const MotionNotifyEventSignalProxy sig_motion_notify_event(); 02440 02441 const DeleteEventSignalProxy sig_delete_event(); 02444 02445 const DestroyEventSignalProxy sig_destroy_event(); 02447 02448 const ExposeEventSignalProxy sig_expose_event(); 02451 02452 const KeyPressEventSignalProxy sig_key_press_event(); 02454 02455 const KeyReleaseEventSignalProxy sig_key_release_event(); 02457 02458 const EnterNotifyEventSignalProxy sig_enter_notify_event(); 02460 02461 const LeaveNotifyEventSignalProxy sig_leave_notify_event(); 02463 02464 const ConfigureEventSignalProxy sig_configure_event(); 02467 02468 const FocusInEventSignalProxy sig_focus_in_event(); 02471 02472 const FocusOutEventSignalProxy sig_focus_out_event(); 02474 02475 const MapEventSignalProxy sig_map_event(); 02478 02479 const UnmapEventSignalProxy sig_unmap_event(); 02482 02483 const PropertyNotifyEventSignalProxy sig_property_notify_event(); 02486 02487 const SelectionClearEventSignalProxy sig_selection_clear_event(); 02490 02491 const SelectionRequestEventSignalProxy sig_selection_request_event(); 02494 02495 const SelectionNotifyEventSignalProxy sig_selection_notify_event(); 02497 02498 const ProximityInEventSignalProxy sig_proximity_in_event(); 02501 02502 const ProximityOutEventSignalProxy sig_proximity_out_event(); 02505 02506 const VisibilityNotifyEventSignalProxy sig_visibility_notify_event(); 02509 02510 const ClientEventSignalProxy sig_client_event(); 02513 02514 const NoExposeEventSignalProxy sig_no_expose_event(); 02517 02518 const WindowStateEventSignalProxy sig_window_state_event(); 02521 02523 }; 02524 02525 } // namespace Gtk 02526 02527 } // namespace GFC 02528 02529 #include <gfc/gtk/inline/widget.inl> 02530 02531 #endif // GFC_GTK_WIDGET_HH 02532

Generated on Tue Aug 24 00:34:33 2004 for GFC-UI by doxygen 1.3.8