|
Public Member Functions |
virtual | ~Widget () |
GtkWidget* | gobj () |
| Provides access to the underlying C GtkObject.
|
const GtkWidget* | gobj () const |
| Provides access to the underlying C GtkObject.
|
bool | set_scroll_adjustments (Adjustment& hadjustment, Adjustment& vadjustment) |
void | show () |
void | show_now () |
void | hide () |
void | show_all () |
void | hide_all () |
void | queue_draw () |
void | queue_draw_area (int x, int y, int width, int height) |
void | queue_resize () |
void | size_request (GtkRequisition* requisition) |
void | size_allocate (GtkAllocation* allocation) |
void | add_accelerator (const Glib::ustring& accel_signal, const Glib::RefPtr<AccelGroup>& accel_group, guint accel_key, Gdk::ModifierType accel_mods, AccelFlags accel_flags) |
bool | remove_accelerator (const Glib::RefPtr<AccelGroup>& accel_group, guint accel_key, Gdk::ModifierType accel_mods) |
void | set_accel_path (const Glib::ustring& accel_path, const Glib::RefPtr<AccelGroup>& accel_group) |
bool | mnemonic_activate (bool group_cycling) |
bool | event (GdkEvent* event) |
int | send_expose (GdkEvent* event) |
bool | activate () |
void | reparent (Widget& newparent) |
bool | intersect (const Gdk::Rectangle& area) const |
bool | intersect (const Gdk::Rectangle& area, Gdk::Rectangle& intersection) const |
GdkRegion* | region_intersect (GdkRegion* region) |
void | freeze_child_notify () |
void | child_notify (const Glib::ustring& child_property) |
void | thaw_child_notify () |
bool | is_focus () const |
void | grab_focus () |
void | grab_default () |
void | add_modal_grab () |
| Block events to everything else than this widget and its children.
|
void | remove_modal_grab () |
| Remove the modal grab of the widget in case it was previously grabbed.
|
void | set_name (const Glib::ustring& name) |
void | unset_name () |
Glib::ustring | get_name () const |
void | set_state (Gtk::StateType state) |
void | set_sensitive (bool sensitive=true) |
void | set_app_paintable (bool app_paintable=true) |
void | set_double_buffered (bool double_buffered=true) |
void | set_redraw_on_allocate (bool redraw_on_allocate=true) |
void | set_child_visible (bool is_visible=true) |
bool | get_child_visible () const |
Container* | get_parent () |
const Container* | get_parent () const |
Glib::RefPtr<Gdk::Window> | get_parent_window () |
Glib::RefPtr<const Gdk::Window> | get_parent_window () const |
void | set_parent_window (const Glib::RefPtr<const Gdk::Window>& parent_window) |
bool | child_focus (DirectionType direction) |
void | set_size_request (int width=-1, int height=-1) |
void | get_size_request (int& width, int& height) const |
void | set_events (Gdk::EventMask events) |
void | add_events (Gdk::EventMask events) |
void | set_extension_events (Gdk::ExtensionMode mode) |
Gdk::ExtensionMode | get_extension_events () const |
Container* | get_toplevel () |
const Container* | get_toplevel () const |
Widget* | get_ancestor (GType type) |
const Widget* | get_ancestor (GType type) const |
Glib::RefPtr<Gdk::Colormap> | get_colormap () |
Glib::RefPtr<Gdk::Visual> | get_visual () |
Glib::RefPtr<Gdk::Screen> | get_screen () |
Glib::RefPtr<const Gdk::Screen> | get_screen () const |
bool | has_screen () const |
Glib::RefPtr<Gdk::Display> | get_display () |
Glib::RefPtr<const Gdk::Display> | get_display () const |
Glib::RefPtr<Gdk::Window> | get_root_window () |
Glib::RefPtr<const Gdk::Window> | get_root_window () const |
Glib::RefPtr<Settings> | get_settings () |
Glib::RefPtr<Clipboard> | get_clipboard (GdkAtom selection) |
Glib::RefPtr<const Clipboard> | get_clipboard (GdkAtom selection) const |
Glib::RefPtr<Atk::Object> | get_accessible () |
void | set_colormap (const Glib::RefPtr<const Gdk::Colormap>& colormap) |
Gdk::EventMask | get_events () const |
void | get_pointer (int& x, int& y) const |
bool | is_ancestor (Widget& widget) const |
bool | translate_coordinates (Widget& dest_widget, int rc_x, int src_y, int& dest_x, int& dest_y) |
void | set_style (const Glib::RefPtr<Style>& style) |
void | unset_style () |
void | ensure_style () |
Glib::RefPtr<Style> | get_style () |
Glib::RefPtr<const Style> | get_style () const |
void | modify_style (const Glib::RefPtr<RcStyle>& style) |
Glib::RefPtr<RcStyle> | get_modifier_style () |
Glib::RefPtr<const RcStyle> | get_modifier_style () const |
void | modify_fg (StateType state, const Gdk::Color& color) |
| Sets the foreground color for a widget in a particular state.
|
void | modify_bg (StateType state, const Gdk::Color& color) |
| Sets the background color for a widget in a particular state.
|
void | modify_bg_pixmap (StateType state, const Glib::ustring& pixmap_name) |
void | modify_text (StateType state, const Gdk::Color& color) |
| Sets the text color for a widget in a particular state.
|
void | modify_base (StateType state, const Gdk::Color& color) |
| Sets the base color for a widget in a particular state.
|
void | modify_font (const Pango::FontDescription& font_desc) |
| Sets the font to use for a widget.
|
void | unset_fg (StateType state) |
| Undo the effect of previous calls to modify_fg() for a particular state.
|
void | unset_bg (StateType state) |
| Undo the effect of previous calls to modify_bg() for a particular state.
|
void | unset_text (StateType state) |
| Undo the effect of previous calls to modify_text() for a particular state.
|
void | unset_base (StateType state) |
| Undo the effect of previous calls to modify_base() for a particular state.
|
void | unset_font () |
| Undo the effect of previous calls to modify_font() for a particular state.
|
template <class PropertyType> void | get_style_property (const Glib::ustring& the_property_name, PropertyType& value) const |
Glib::RefPtr<Pango::Context> | create_pango_context () |
Glib::RefPtr<Pango::Context> | get_pango_context () |
Glib::RefPtr<Pango::Layout> | create_pango_layout (const Glib::ustring& text) |
Glib::RefPtr<Gdk::Pixbuf> | render_icon (const StockID& stock_id, IconSize size, const Glib::ustring& detail=Glib::ustring()) |
void | set_composite_name (const Glib::ustring& name) |
void | unset_composite_name () |
Glib::ustring | get_composite_name () const |
void | reset_rc_styles () |
void | set_direction (TextDirection dir) |
TextDirection | get_direction () |
void | shape_combine_mask (const Glib::RefPtr<const Gdk::Bitmap>& shape_mask, int offset_x, int offset_y) |
void | unset_shape_combine_mask () |
void | reset_shapes () |
void | path (Glib::ustring& path, Glib::ustring& path_reversed) |
| Compute a widget's path of the form "GtkWindow.MyLabel".
|
void | class_path (Glib::ustring& path, Glib::ustring& path_reversed) |
void | drag_get_data (const Glib::RefPtr<Gdk::DragContext>& context, GdkAtom target, guint32 time) |
void | drag_highlight () |
void | drag_unhighlight () |
void | drag_dest_set (DestDefaults flags=DestDefaults(0), Gdk::DragAction actions=Gdk::DragAction(0)) |
void | drag_dest_set (const ArrayHandle_TargetEntry& targets, DestDefaults flags=DEST_DEFAULT_ALL, Gdk::DragAction actions=Gdk::ACTION_COPY) |
void | drag_dest_set_proxy (const Glib::RefPtr<Gdk::Window>& proxy_window, Gdk::DragProtocol protocol, bool use_coordinates) |
void | drag_dest_unset () |
GdkAtom | drag_dest_find_target (const Glib::RefPtr<Gdk::DragContext>& context, GtkTargetList* target_list) |
GdkAtom | drag_dest_find_target (const Glib::RefPtr<Gdk::DragContext>& context) |
GtkTargetList* | drag_dest_get_target_list () |
void | drag_dest_set_target_list (GtkTargetList* target_list) |
void | drag_source_set (const ArrayHandle_TargetEntry& targets, Gdk::ModifierType start_button_mask=Gdk::MODIFIER_MASK, Gdk::DragAction actions=Gdk::ACTION_COPY) |
void | drag_source_unset () |
void | drag_source_set_icon (const Glib::RefPtr<Gdk::Colormap>& colormap, const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask) |
void | drag_source_set_icon (const Glib::RefPtr<Gdk::Pixbuf>& pixbuf) |
void | drag_source_set_icon (const StockID& stock_id) |
Glib::RefPtr<Gdk::DragContext> | drag_begin (GtkTargetList* targets, Gdk::DragAction actions, gint button, GdkEvent* event) |
bool | drag_check_threshold (int start_x, int start_y, int current_x, int current_y) |
void | drag_set_as_icon (const Glib::RefPtr<Gdk::DragContext>& context, int hot_x, int hot_y) |
void | queue_resize_no_redraw () |
bool | get_no_show_all () const |
void | set_no_show_all (bool no_show_all=true) |
bool | is_toplevel () const |
bool | has_no_window () const |
bool | is_realized () const |
bool | is_mapped () const |
bool | is_visible () const |
bool | is_drawable () const |
bool | sensitive () const |
bool | parent_sensitive () const |
bool | is_sensitive () const |
bool | can_focus () const |
bool | has_focus () const |
bool | can_default () const |
bool | has_default () const |
bool | has_grab () const |
bool | rc_style () const |
bool | is_composite_child () const |
bool | app_paintable () const |
bool | receives_default () const |
bool | double_buffered () const |
WidgetFlags | get_flags () const |
void | set_flags (WidgetFlags flags) |
void | unset_flags (WidgetFlags flags) |
int | get_width () const |
int | get_height () const |
Gtk::StateType | get_state () const |
Gtk::StateType | get_saved_state () const |
GtkRequisition | get_requisition () const |
GtkAllocation | get_allocation () const |
Glib::RefPtr<Gdk::Window> | get_window () |
Glib::RefPtr<const Gdk::Window> | get_window () const |
Glib::SignalProxy0<void> | signal_show () |
Glib::SignalProxy0<void> | signal_hide () |
Glib::SignalProxy0<void> | signal_map () |
Glib::SignalProxy0<void> | signal_unmap () |
Glib::SignalProxy0<void> | signal_realize () |
Glib::SignalProxy0<void> | signal_unrealize () |
Glib::SignalProxy1< void,
GtkRequisition* > | signal_size_request () |
Glib::SignalProxy1< void,
GtkAllocation* > | signal_size_allocate () |
Glib::SignalProxy1< void,
Gtk::StateType > | signal_state_changed () |
Glib::SignalProxy1< void,
Widget* > | signal_parent_changed () |
Glib::SignalProxy1< void,
Widget* > | signal_hierarchy_changed () |
Glib::SignalProxy1< void,
const Glib::RefPtr<Style >&> | signal_style_changed () |
Glib::SignalProxy1< void,
TextDirection > | signal_direction_changed () |
Glib::SignalProxy1< void,
bool > | signal_grab_notify () |
Glib::SignalProxy1< void,
GParamSpec* > | signal_child_notify () |
Glib::SignalProxy1< bool,
bool > | signal_mnemonic_activate () |
Glib::SignalProxy0<void> | signal_grab_focus () |
Glib::SignalProxy1< bool,
DirectionType > | signal_focus () |
Glib::SignalProxy1< bool,
GdkEvent* > | signal_event () |
Glib::SignalProxy1< bool,
GdkEventButton* > | signal_button_press_event () |
Glib::SignalProxy1< bool,
GdkEventButton* > | signal_button_release_event () |
Glib::SignalProxy1< bool,
GdkEventScroll* > | signal_scroll_event () |
Glib::SignalProxy1< bool,
GdkEventMotion* > | signal_motion_notify_event () |
Glib::SignalProxy1< bool,
GdkEventAny* > | signal_delete_event () |
Glib::SignalProxy1< bool,
GdkEventExpose* > | signal_expose_event () |
Glib::SignalProxy1< bool,
GdkEventKey* > | signal_key_press_event () |
Glib::SignalProxy1< bool,
GdkEventKey* > | signal_key_release_event () |
Glib::SignalProxy1< bool,
GdkEventCrossing* > | signal_enter_notify_event () |
Glib::SignalProxy1< bool,
GdkEventCrossing* > | signal_leave_notify_event () |
Glib::SignalProxy1< bool,
GdkEventConfigure* > | signal_configure_event () |
Glib::SignalProxy1< bool,
GdkEventFocus* > | signal_focus_in_event () |
Glib::SignalProxy1< bool,
GdkEventFocus* > | signal_focus_out_event () |
Glib::SignalProxy1< bool,
GdkEventAny* > | signal_map_event () |
Glib::SignalProxy1< bool,
GdkEventAny* > | signal_unmap_event () |
Glib::SignalProxy1< bool,
GdkEventProperty* > | signal_property_notify_event () |
Glib::SignalProxy1< bool,
GdkEventSelection* > | signal_selection_clear_event () |
Glib::SignalProxy1< bool,
GdkEventSelection* > | signal_selection_request_event () |
Glib::SignalProxy1< bool,
GdkEventSelection* > | signal_selection_notify_event () |
Glib::SignalProxy1< bool,
GdkEventProximity* > | signal_proximity_in_event () |
Glib::SignalProxy1< bool,
GdkEventProximity* > | signal_proximity_out_event () |
Glib::SignalProxy1< bool,
GdkEventVisibility* > | signal_visibility_notify_event () |
Glib::SignalProxy1< bool,
GdkEventClient* > | signal_client_event () |
Glib::SignalProxy1< bool,
GdkEventAny* > | signal_no_expose_event () |
Glib::SignalProxy1< bool,
GdkEventWindowState* > | signal_window_state_event () |
Glib::SignalProxy3< void,
GtkSelectionData *, guint,
guint > | signal_selection_get () |
Glib::SignalProxy2< void,
const SelectionData&, guint > | signal_selection_received () |
Glib::SignalProxy1< void,
const Glib::RefPtr<Gdk::DragContext >&> | signal_drag_begin () |
Glib::SignalProxy1< void,
const Glib::RefPtr<Gdk::DragContext >&> | signal_drag_end () |
Glib::SignalProxy4< void,
const Glib::RefPtr<Gdk::DragContext>&,
GtkSelectionData *, guint,
guint > | signal_drag_data_get () |
Glib::SignalProxy1< void,
const Glib::RefPtr<Gdk::DragContext >&> | signal_drag_data_delete () |
Glib::SignalProxy2< void,
const Glib::RefPtr<Gdk::DragContext>&,
guint > | signal_drag_leave () |
Glib::SignalProxy4< bool,
const Glib::RefPtr<Gdk::DragContext>&,
int, int, guint > | signal_drag_motion () |
Glib::SignalProxy4< bool,
const Glib::RefPtr<Gdk::DragContext>&,
int, int, guint > | signal_drag_drop () |
Glib::SignalProxy6< void,
const Glib::RefPtr<Gdk::DragContext>&,
int, int, const SelectionData&,
guint, guint > | signal_drag_data_received () |
Glib::PropertyProxy<Glib::ustring> | property_name () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::PropertyProxy<Container*> | property_parent () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::PropertyProxy<int> | property_width_request () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::PropertyProxy<int> | property_height_request () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::PropertyProxy<bool> | property_visible () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::PropertyProxy<bool> | property_sensitive () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::PropertyProxy<bool> | property_app_paintable () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::PropertyProxy<bool> | property_can_focus () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::PropertyProxy<bool> | property_has_focus () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::PropertyProxy<bool> | property_can_default () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::PropertyProxy<bool> | property_has_default () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::PropertyProxy<bool> | property_receives_default () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::PropertyProxy_ReadOnly<
bool > | property_composite_child () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::PropertyProxy< Glib::RefPtr<
Style > > | property_style () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::PropertyProxy<Gdk::EventMask> | property_events () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::PropertyProxy<Gdk::ExtensionMode> | property_extension_events () |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Static Public Member Functions |
Widget* | get_current_modal_grab () |
| Retrieve the widget which is currently grabbing all events.
|
void | push_colormap (const Glib::RefPtr<const Gdk::Colormap>& cmap) |
void | pop_colormap () |
void | push_composite_child () |
void | pop_composite_child () |
void | set_default_colormap (const Glib::RefPtr<const Gdk::Colormap>& colormap) |
Glib::RefPtr<Style> | get_default_style () |
Glib::RefPtr<Gdk::Colormap> | get_default_colormap () |
Glib::RefPtr<Gdk::Visual> | get_default_visual () |
void | set_default_direction (TextDirection dir) |
TextDirection | get_default_direction () |
Widget* | drag_get_source_widget (const Glib::RefPtr<Gdk::DragContext>& context) |
Protected Member Functions |
virtual void | dispatch_child_properties_changed_vfunc (guint p1, GParamSpec** p2) |
virtual void | show_all_vfunc () |
virtual void | hide_all_vfunc () |
virtual Glib::RefPtr<Atk::Object> | get_accessible_vfunc () |
virtual void | on_show () |
virtual void | on_hide () |
virtual void | on_map () |
virtual void | on_unmap () |
virtual void | on_realize () |
virtual void | on_unrealize () |
virtual void | on_size_request (GtkRequisition* requisition) |
virtual void | on_size_allocate (GtkAllocation* allocation) |
virtual void | on_state_changed (Gtk::StateType previous_state) |
virtual void | on_parent_changed (Widget* previous_parent) |
virtual void | on_hierarchy_changed (Widget* previous_toplevel) |
virtual void | on_style_changed (const Glib::RefPtr<Style>& previous_style) |
virtual void | on_direction_changed (TextDirection direction) |
virtual void | on_grab_notify (bool was_grabbed) |
virtual void | on_child_notify (GParamSpec* pspec) |
virtual bool | on_mnemonic_activate (bool group_cycling) |
virtual void | on_grab_focus () |
virtual bool | on_focus (DirectionType direction) |
virtual bool | on_event (GdkEvent* event) |
virtual bool | on_button_press_event (GdkEventButton* event) |
virtual bool | on_button_release_event (GdkEventButton* event) |
virtual bool | on_scroll_event (GdkEventScroll* event) |
virtual bool | on_motion_notify_event (GdkEventMotion* event) |
virtual bool | on_delete_event (GdkEventAny* event) |
virtual bool | on_expose_event (GdkEventExpose* event) |
virtual bool | on_key_press_event (GdkEventKey* event) |
virtual bool | on_key_release_event (GdkEventKey* event) |
virtual bool | on_enter_notify_event (GdkEventCrossing* event) |
virtual bool | on_leave_notify_event (GdkEventCrossing* event) |
virtual bool | on_configure_event (GdkEventConfigure* event) |
virtual bool | on_focus_in_event (GdkEventFocus* event) |
virtual bool | on_focus_out_event (GdkEventFocus* event) |
virtual bool | on_map_event (GdkEventAny* event) |
virtual bool | on_unmap_event (GdkEventAny* event) |
virtual bool | on_property_notify_event (GdkEventProperty* event) |
virtual bool | on_selection_clear_event (GdkEventSelection* event) |
virtual bool | on_selection_request_event (GdkEventSelection* event) |
virtual bool | on_selection_notify_event (GdkEventSelection* event) |
virtual bool | on_proximity_in_event (GdkEventProximity* event) |
virtual bool | on_proximity_out_event (GdkEventProximity* event) |
virtual bool | on_visibility_notify_event (GdkEventVisibility* event) |
virtual bool | on_client_event (GdkEventClient* event) |
virtual bool | on_no_expose_event (GdkEventAny* event) |
virtual bool | on_window_state_event (GdkEventWindowState* event) |
virtual void | on_selection_get (GtkSelectionData* selection_data, guint info, guint time) |
virtual void | on_selection_received (const SelectionData& selection_data, guint time) |
virtual void | on_drag_begin (const Glib::RefPtr<Gdk::DragContext>& context) |
virtual void | on_drag_end (const Glib::RefPtr<Gdk::DragContext>& context) |
virtual void | on_drag_data_get (const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time) |
virtual void | on_drag_data_delete (const Glib::RefPtr<Gdk::DragContext>& context) |
virtual void | on_drag_leave (const Glib::RefPtr<Gdk::DragContext>& context, guint time) |
virtual bool | on_drag_motion (const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time) |
virtual bool | on_drag_drop (const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time) |
virtual void | on_drag_data_received (const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const SelectionData& selection_data, guint info, guint time) |
| Widget () |
void | map () |
void | unmap () |
void | realize () |
void | unrealize () |
void | set_parent (Widget& parent) |
void | unparent () |
void | get_child_requisition (GtkRequisition* requisition) |
void | get_style_property_value (const Glib::ustring& the_property_name, Glib::ValueBase& value) const |
void | realize_if_needed () |
void | set_allocation (const GtkAllocation& value) |
void | set_window (const Glib::RefPtr<Gdk::Window>& value) |
Friends |
class | Main |
Related Functions |
(Note that these are not member functions.)
|
Gtk::Widget* | wrap (GtkWidget* object, bool take_copy=false) |
As the base class of all widgets this contains all of the properties and methods common to all widgets. It is an abstract class that can not be instantiated.
Important part of widgets are the *_event signals and virtual methods that every widget have. 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 ().