Class Index | Cross Index | Namespace Index |
Abstract Widget (Base class for all widgets)
Contained in: Gtk
Derived from:
Gtk::Object
Derived by:
Gtk::Calendar
Gtk::Container
Gtk::DrawingArea
Gtk::Editable
Gtk::Misc
Gtk::Preview
Gtk::Progress
Gtk::Range
Gtk::Ruler
Gtk::Separator
#include <gtk--/widget.h>
public function member index: |
||
bool | accelerators_locked | (); |
bool | activate | (); |
void | add_accelerator | (const nstring& accel_signal, AccelGroup& accel_group, guint accel_key, guint accel_mods, GtkAccelFlags accel_flags); |
void | add_events | (gint events); |
bool | app_paintable | () const; |
emitable signal gint | button_press_event | (GdkEventButton*); |
emitable signal gint | button_release_event | (GdkEventButton*); |
bool | can_default | () const; |
bool | can_focus | () const; |
void | class_path | (string& path, string& path_reversed); |
emitable signal gint | client_event | (GdkEventClient*); |
emitable signal gint | configure_event | (GdkEventConfigure*); |
signal void | debug_msg | (const gchar*); |
emitable signal gint | delete_event | (GdkEventAny*); |
signal void | drag_begin | (GdkDragContext*); |
signal void | drag_data_delete | (GdkDragContext*); |
signal void | drag_data_get | (GdkDragContext*, GtkSelectionData*, guint, guint); |
signal void | drag_data_received | (GdkDragContext*, gint, gint, GtkSelectionData*, guint, guint32); |
void | drag_dest_set | (GtkDestDefaults flags, const GtkTargetEntry* targets, gint n_targets, GdkDragAction actions); |
void | drag_dest_set_proxy | (Gdk_Window& proxy_window, GdkDragProtocol protocol, bool use_coordinates); |
void | drag_dest_unset | (); |
signal gboolean | drag_drop | (GdkDragContext*, gint, gint, guint); |
signal void | drag_end | (GdkDragContext*); |
static void | drag_finish | (Gdk_Drag_Context& context, bool success, bool del, guint32 time); |
void | drag_get_data | (Gdk_Drag_Context& context, Gdk_Atom target, guint32 time); |
static Widget* | drag_get_source_widget | (GdkDragContext* context); |
void | drag_highlight | (); |
signal void | drag_leave | (GdkDragContext*, guint); |
signal gboolean | drag_motion | (GdkDragContext*, gint, gint, guint); |
static void | drag_set_default_icon | (Gdk_Colormap& colormap, Gdk_Pixmap& pixmap, Gdk_Bitmap& mask, gint hot_x, gint hot_y); |
static void | drag_set_icon_default | (Gdk_Drag_Context& context); |
static void | drag_set_icon_pixmap | (Gdk_Drag_Context& context, Gdk_Colormap& colormap, Gdk_Pixmap& pixmap, Gdk_Bitmap& mask, gint hot_x, gint hot_y); |
static void | drag_set_icon_widget | (Gdk_Drag_Context& context, Widget& widget, gint hot_x, gint hot_y); |
void | drag_source_set | (GdkModifierType start_button_mask, const GtkTargetEntry* targets, gint n_targets, GdkDragAction actions); |
void | drag_source_set_icon | (Gdk_Colormap& colormap, Gdk_Pixmap& pixmap, Gdk_Bitmap& mask); |
void | drag_source_unset | (); |
void | drag_unhighlight | (); |
void | draw | (GdkRectangle* p0); |
emitable signal void | draw_default | (); |
emitable signal void | draw_focus | (); |
void | ensure_style | (); |
emitable signal gint | enter_notify_event | (GdkEventCrossing*); |
emitable signal gint | event | (GdkEvent*); |
emitable signal gint | expose_event | (GdkEventExpose*); |
emitable signal gint | focus_in_event | (GdkEventFocus*); |
emitable signal gint | focus_out_event | (GdkEventFocus*); |
Widget* | get_ancestor | (GtkType type) const; |
Gdk_Colormap | get_colormap | () const; |
nstring | get_composite_name | (); |
static Gdk_Colormap | get_default_colormap | (); |
static Style* | get_default_style | (); |
static Gdk_Visual | get_default_visual | (); |
gint | get_events | () const; |
GdkExtensionMode | get_extension_events | () const; |
nstring | get_name | () const; |
Widget* | get_parent | () const; |
Gdk_Window | get_parent_window | () const; |
void | get_pointer | (gint& x, gint& y) const; |
GtkStateType | get_state | () const; |
Style* | get_style | () const; |
Window* | get_toplevel | (); |
Gdk_Visual | get_visual | () const; |
Gdk_Window | get_window | () const; |
void | grab_default | (); |
emitable signal void | grab_focus | (); |
GdkDragContext* | gtkmm_drag_begin | (GtkTargetList* p0, GdkDragAction p1, gint p2, GdkEvent* p3); |
GtkWidget* | gtkobj | (); |
const GtkWidget* | gtkobj | () const; |
bool | has_default | () const; |
bool | has_focus | () const; |
bool | has_grab | () const; |
bool | has_no_window | () const; |
gint | height | () const; |
emitable signal void | hide | (); |
void | hide_all | (); |
gint | intersect | (const Gdk_Rectangle& area, const Gdk_Rectangle& intersection) const; |
static bool | isA | (Object* object); |
bool | is_ancestor | (Widget& widget) const; |
bool | is_composite_child | () const; |
bool | is_drawable | () const; |
bool | is_mapped | () const; |
bool | is_realized | () const; |
bool | is_sensitive | () const; |
bool | is_toplevel | () const; |
bool | is_visible | () const; |
emitable signal gint | key_press_event | (GdkEventKey*); |
emitable signal gint | key_release_event | (GdkEventKey*); |
emitable signal gint | leave_notify_event | (GdkEventCrossing*); |
void | lock_accelerators | (); |
emitable signal void | map_ | (); |
emitable signal gint | map_event | (GdkEventAny*); |
emitable signal gint | motion_notify_event | (GdkEventMotion*); |
emitable signal gint | no_expose_event | (GdkEventAny*); |
signal void | parent_changed | (Widget*); |
bool | parent_sensitive | () const; |
void | path | (string& path, string& path_reversed); |
static void | pop_colormap | (); |
static void | pop_composite_child | (); |
static void | pop_style | (); |
static void | pop_visual | (); |
void | popup | (gint x, gint y); |
emitable signal gint | property_notify_event | (GdkEventProperty*); |
emitable signal gint | proximity_in_event | (GdkEventProximity*); |
emitable signal gint | proximity_out_event | (GdkEventProximity*); |
static void | push_colormap | (const Gdk_Colormap& cmap); |
static void | push_composite_child | (); |
static void | push_style | (Style& style); |
static void | push_visual | (const Gdk_Visual& visual); |
void | queue_clear | (); |
void | queue_clear_area | (gint x, gint y, gint width, gint height); |
void | queue_draw | (); |
void | queue_draw_area | (gint x, gint y, gint width, gint height); |
void | queue_resize | (); |
bool | rc_style | () const; |
emitable signal void | realize | (); |
bool | recieves_default | () const; |
void | remove_accelerator | (AccelGroup& accel_group, guint accel_key, guint accel_mods); |
void | remove_accelerators | (const nstring& accel_signal, bool visible_only); |
void | reparent | (Widget& newparent); |
void | reset_rc_styles | (); |
void | restore_default_style | (); |
emitable signal gint | selection_clear_event | (GdkEventSelection*); |
signal void | selection_get | (GtkSelectionData*, guint, guint); |
emitable signal gint | selection_notify_event | (GdkEventSelection*); |
signal void | selection_received | (GtkSelectionData*, guint); |
emitable signal gint | selection_request_event | (GdkEventSelection*); |
bool | sensitive | () const; |
void | set_app_paintable | (bool app_paintable); |
void | set_colormap | (const Gdk_Colormap& colormap); |
void | set_composite_name | (const nstring& name); |
static void | set_default_colormap | (const Gdk_Colormap& colormap); |
static void | set_default_style | (Style& style); |
static void | set_default_visual | (const Gdk_Visual& visual); |
void | set_events | (gint events); |
void | set_extension_events | (GdkExtensionMode mode); |
void | set_flags | (gint flag); |
void | set_name | (const nstring& name); |
void | set_parent_window | (const Gdk_Window& parent_window); |
void | set_rc_style | (); |
void | set_sensitive | (bool sensitive); |
void | set_state | (GtkStateType state); |
void | set_style | (Style& style); |
void | set_uposition | (gint x, gint y); |
void | set_usize | (gint x, gint y); |
void | set_visual | (const Gdk_Visual& visual); |
void | shape_combine_mask | (const Gdk_Bitmap& shape_mask, gint offset_x, gint offset_y); |
emitable signal void | show | (); |
void | show_all | (); |
void | show_now | (); |
emitable signal void | size_allocate | (GtkAllocation*); |
emitable signal void | size_request | (GtkRequisition*); |
signal void | state_changed | (GtkStateType); |
signal void | style_changed | (Style*); |
void | unlock_accelerators | (); |
emitable signal void | unmap_ | (); |
emitable signal gint | unmap_event | (GdkEventAny*); |
void | unparent | (); |
void | unset_flags | (gint flag); |
emitable signal gint | visibility_notify_event | (GdkEventVisibility*); |
gint | width | () const; |
virtual | ~Widget | (); |
protected function member index: |
||
Widget | (); | |
virtual gint | button_press_event_impl | (GdkEventButton* p0); |
virtual gint | button_release_event_impl | (GdkEventButton* p0); |
virtual gint | client_event_impl | (GdkEventClient* p0); |
virtual gint | configure_event_impl | (GdkEventConfigure* p0); |
virtual void | debug_msg_impl | (const gchar* p0); |
virtual gint | delete_event_impl | (GdkEventAny* p0); |
virtual void | drag_begin_impl | (GdkDragContext* p0); |
virtual void | drag_data_delete_impl | (GdkDragContext* p0); |
virtual void | drag_data_get_impl | (GdkDragContext* p0, GtkSelectionData* p1, guint p2, guint p3); |
virtual void | drag_data_received_impl | (GdkDragContext* p0, gint p1, gint p2, GtkSelectionData* p3, guint p4, guint32 p5); |
virtual gboolean | drag_drop_impl | (GdkDragContext* p0, gint p1, gint p2, guint p3); |
virtual void | drag_end_impl | (GdkDragContext* p0); |
virtual void | drag_leave_impl | (GdkDragContext* p0, guint p1); |
virtual gboolean | drag_motion_impl | (GdkDragContext* p0, gint p1, gint p2, guint p3); |
virtual void | draw_default_impl | (); |
virtual void | draw_focus_impl | (); |
virtual void | draw_impl | (GdkRectangle* p0); |
virtual gint | enter_notify_event_impl | (GdkEventCrossing* p0); |
virtual gint | event_impl | (GdkEvent* p0); |
virtual gint | expose_event_impl | (GdkEventExpose* p0); |
virtual gint | focus_in_event_impl | (GdkEventFocus* p0); |
virtual gint | focus_out_event_impl | (GdkEventFocus* p0); |
virtual void | grab_focus_impl | (); |
virtual void | hide_all_impl | (); |
virtual void | hide_impl | (); |
virtual gint | key_press_event_impl | (GdkEventKey* p0); |
virtual gint | key_release_event_impl | (GdkEventKey* p0); |
virtual gint | leave_notify_event_impl | (GdkEventCrossing* p0); |
virtual void | map__impl | (); |
virtual gint | map_event_impl | (GdkEventAny* p0); |
virtual gint | motion_notify_event_impl | (GdkEventMotion* p0); |
virtual gint | no_expose_event_impl | (GdkEventAny* p0); |
virtual void | parent_changed_impl | (Widget* p0); |
virtual gint | property_notify_event_impl | (GdkEventProperty* p0); |
virtual gint | proximity_in_event_impl | (GdkEventProximity* p0); |
virtual gint | proximity_out_event_impl | (GdkEventProximity* p0); |
void | realize_if_needed | (); |
virtual void | realize_impl | (); |
virtual gint | selection_clear_event_impl | (GdkEventSelection* p0); |
virtual void | selection_get_impl | (GtkSelectionData* p0, guint p1, guint p2); |
virtual gint | selection_notify_event_impl | (GdkEventSelection* p0); |
virtual void | selection_received_impl | (GtkSelectionData* p0, guint p1); |
virtual gint | selection_request_event_impl | (GdkEventSelection* p0); |
virtual void | show_all_impl | (); |
virtual void | show_impl | (); |
virtual void | size_allocate_impl | (GtkAllocation* p0); |
virtual void | size_request_impl | (GtkRequisition* p0); |
virtual void | state_changed_impl | (GtkStateType p0); |
virtual void | style_changed_impl | (Style* p0); |
virtual void | unmap__impl | (); |
virtual gint | unmap_event_impl | (GdkEventAny* p0); |
virtual gint | visibility_notify_event_impl | (GdkEventVisibility* p0); |
private function member index: |
||
void | reset_shapes | (); |
Important part of widgets is the *_event signals and virtual methods that every widget has. Those are events coming directly from gdk and thus also from XLib. By overriding those virtual methods you can trap everything a widget can ever do. In order to capture events from a widget, the event mask must first be set with set_events.
Only widgets with a Gdk_Window on the server side are allowed to
capture events. Widgets in the Gtk::Misc group for example lack
a Gdk_Window.
This is a gtk virtual function. It can only be overriden with the impl method.
Expose events cover a rectangular area that was covered or obscured by another window. That area is now exposed and thus is needs to be redrawn.If the application is not capable of redrawing sections it should watch the count field and only draw on the last even indicated. This is important for things such as Gtk::DrawingArea.
Once a style is used it is constant and unchangeable.
See {flags.mapped}. This should not be called by the user.
The widget passed is the former parent, which may be 0 if there was no parent. (was parent_set in gtk+)
See {flags.realized}. This is also responsible for setting {flags.realized} when it is done. Therefore, when overriding the impl method, you should call the default realize method.
Equivalent to removing widget from old parent and adding it to the new parent, except that the widget will not be temporarily unrealized if both the old parent and the new parent are realized.Use this in place of in an application.
The available event masks that the user can select are: GDK_EXPOSURE_MASK, GDK_POINTER_MOTION_MASK, GDK_POINTER_MOTION_HINT_MASK, GDK_BUTTON_MOTION_MASK, GDK_BUTTON1_MOTION_MASK, GDK_BUTTON2_MOTION_MASK, GDK_BUTTON3_MOTION_MASK, GDK_BUTTON_PRESS_MASK, GDK_BUTTON_RELEASE_MASK, GDK_KEY_PRESS_MASK, GDK_KEY_RELEASE_MASK, GDK_ENTER_NOTIFY_MASK, GDK_LEAVE_NOTIFY_MASK, GDK_FOCUS_CHANGE_MASK, GDK_STRUCTURE_MASK, GDK_PROPERTY_CHANGE_MASK, GDK_VISIBILITY_NOTIFY_MASK, GDK_PROXIMITY_IN_MASK, GDK_PROXIMITY_OUT_MASK, GDK_SUBSTRUCTURE_MASK
You can name your widgets, so that you can know which one you have a pointer to. I don't think that this has anything to do with a text label that is shown on the widget.
The sensitivity of a widget is whether it will accept user input or not. Usually this also changes the widget's look, to incicate it's usability. Set true to allow user input on the widget, false to disable user input.
The style of a widget includes font, color, and other information.
Set either x or y to -1 to keep it's old size.
If the widget is not already destroyed, this will make the widget visible by setting {flags.visible}.
The old state is passed as the argument.
The former style is passed as the argument. (was style_set in gtk+)