diff options
author | Robin Gareus <robin@gareus.org> | 2017-07-17 00:00:11 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-07-17 21:06:04 +0200 |
commit | b5e9451bc7be12acc5d81c55cdaa6545837f3181 (patch) | |
tree | 13df7f92eaf327c13324641804bf0aa87ea6c165 /libs/gtkmm2ext/gtkmm2ext | |
parent | f6e182b937efda6ed0ba50dbc02af98524beb61c (diff) |
Remove unused sources & includes
Diffstat (limited to 'libs/gtkmm2ext/gtkmm2ext')
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/bindable_button.h | 87 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/cairo_icon.h | 53 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/cairocell.h | 250 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/fader.h | 111 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/grouped_buttons.h | 50 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h | 49 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/pixscroller.h | 71 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/selector.h | 114 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/tabbable.h | 1 |
9 files changed, 0 insertions, 786 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/bindable_button.h b/libs/gtkmm2ext/gtkmm2ext/bindable_button.h deleted file mode 100644 index d96f8145a4..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/bindable_button.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright (C) 2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __bindable_button_h__ -#define __bindable_button_h__ - -#include <string> - -#include "pbd/signals.h" - -#include "gtkmm2ext/visibility.h" -#include "gtkmm2ext/stateful_button.h" -#include "gtkmm2ext/binding_proxy.h" - -namespace PBD { - class Controllable; -} - -class LIBGTKMM2EXT_API BindableToggleButton : public Gtkmm2ext::StatefulToggleButton -{ - public: - BindableToggleButton (const std::string &label) - : Gtkmm2ext::StatefulToggleButton (label) {} - BindableToggleButton () {} - - virtual ~BindableToggleButton() {} - - bool on_button_press_event (GdkEventButton *ev) { - if (!binding_proxy.button_press_handler (ev)) { - StatefulToggleButton::on_button_press_event (ev); - return false; - } else { - return true; - } - } - - boost::shared_ptr<PBD::Controllable> get_controllable() { return binding_proxy.get_controllable(); } - void set_controllable (boost::shared_ptr<PBD::Controllable> c); - void watch (); - - protected: - void controllable_changed (); - PBD::ScopedConnection watch_connection; - - private: - BindingProxy binding_proxy; -}; - -class LIBGTKMM2EXT_API BindableButton : public Gtkmm2ext::StatefulButton -{ - public: - BindableButton (boost::shared_ptr<PBD::Controllable> c) : binding_proxy (c) {} - ~BindableButton() {} - - bool on_button_press_event (GdkEventButton *ev) { - if (!binding_proxy.button_press_handler (ev)) { - StatefulButton::on_button_press_event (ev); - return false; - } else { - return true; - } - } - - boost::shared_ptr<PBD::Controllable> get_controllable() { return binding_proxy.get_controllable(); } - void set_controllable (boost::shared_ptr<PBD::Controllable> c) { binding_proxy.set_controllable (c); } - - private: - BindingProxy binding_proxy; -}; - -#endif diff --git a/libs/gtkmm2ext/gtkmm2ext/cairo_icon.h b/libs/gtkmm2ext/gtkmm2ext/cairo_icon.h deleted file mode 100644 index aebf5779da..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/cairo_icon.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2015 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __gtk2_ardour_cairo_icon_h__ -#define __gtk2_ardour_cairo_icon_h__ - -#include <gtkmm/bin.h> - -#include "gtkmm2ext/visibility.h" -#include "gtkmm2ext/ardour_icon.h" - -/** A parent class for icons that are rendered using Cairo but need to be - * widgets for event handling - */ - -namespace Gtkmm2ext { - -class LIBGTKMM2EXT_API CairoIcon : public Gtk::Bin -{ -public: - CairoIcon (Gtkmm2ext::ArdourIcon::Icon, uint32_t fg = 0x000000ff); - virtual ~CairoIcon (); - - void render (cairo_t *, cairo_rectangle_t*); - void set_fg (uint32_t fg); - - bool on_expose_event (GdkEventExpose*); - - private: - Cairo::RefPtr<Cairo::Surface> image_surface; - ArdourIcon::Icon icon_type; - uint32_t fg; -}; - -} - -#endif /* __gtk2_ardour_cairo_icon_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/cairocell.h b/libs/gtkmm2ext/gtkmm2ext/cairocell.h deleted file mode 100644 index 8fe166624f..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/cairocell.h +++ /dev/null @@ -1,250 +0,0 @@ -/* - Copyright (C) 2011 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __libgtmm2ext_cairocell_h__ -#define __libgtmm2ext_cairocell_h__ - -#include <map> - -#include <stdint.h> - -#include <boost/shared_ptr.hpp> - -#include <cairomm/cairomm.h> -#include <gtkmm/misc.h> - -#include "gtkmm2ext/visibility.h" - -class LIBGTKMM2EXT_API CairoCell -{ - public: - CairoCell(int32_t id); - virtual ~CairoCell() {} - - int32_t id() const { return _id; } - - virtual void render (Cairo::RefPtr<Cairo::Context>&) = 0; - - double x() const { return bbox.x; } - double y() const { return bbox.y; } - double width() const { return bbox.width; } - double height() const { return bbox.height; } - - void set_position (double x, double y) { - bbox.x = x; - bbox.y = y; - } - - bool intersects (GdkRectangle& r) const { - return gdk_rectangle_intersect (&r, &bbox, 0); - } - - bool covers (double x, double y) const { - return bbox.x <= x && bbox.x + bbox.width > x && - bbox.y <= y && bbox.y + bbox.height > y; - } - - double xpad() const { return _xpad; } - void set_xpad (double x) { _xpad = x; } - - void set_visible (bool yn) { _visible = yn; } - bool visible() const { return _visible; } - virtual void set_size (Cairo::RefPtr<Cairo::Context>&) {} - - protected: - int32_t _id; - GdkRectangle bbox; - bool _visible; - uint32_t _xpad; -}; - -class LIBGTKMM2EXT_API CairoFontDescription { - public: - CairoFontDescription (const std::string& f, - Cairo::FontSlant s, - Cairo::FontWeight w, - double sz) - : face (f) - , _slant (s) - , _weight (w) - , _size (sz) - {} - CairoFontDescription (Pango::FontDescription&); - - void apply (Cairo::RefPtr<Cairo::Context> context) { - context->select_font_face (face, _slant, _weight); - context->set_font_size (_size); - } - - void set_size (double sz) { _size = sz; } - double size() const { return _size; } - - Cairo::FontSlant slant() const { return _slant; } - void set_slant (Cairo::FontSlant sl) { _slant = sl; } - - Cairo::FontWeight weight() const { return _weight; } - void set_weight (Cairo::FontWeight w) { _weight = w; } - - private: - std::string face; - Cairo::FontSlant _slant; - Cairo::FontWeight _weight; - double _size; -}; - -class LIBGTKMM2EXT_API CairoTextCell : public CairoCell -{ - public: - CairoTextCell (int32_t id, double width_chars, boost::shared_ptr<CairoFontDescription> font = boost::shared_ptr<CairoFontDescription>()); - ~CairoTextCell() {} - - virtual void set_size (Cairo::RefPtr<Cairo::Context>&); - - boost::shared_ptr<CairoFontDescription> font() const { return _font; } - - std::string get_text() const { - return _text; - } - - double width_chars() const { return _width_chars; } - void render (Cairo::RefPtr<Cairo::Context>&); - - protected: - friend class CairoEditableText; - void set_width_chars (double wc) { _width_chars = wc; } - void set_text (const std::string& txt); - void set_font (boost::shared_ptr<CairoFontDescription> font) { - _font = font; - } - - protected: - double _width_chars; - std::string _text; - boost::shared_ptr<CairoFontDescription> _font; - double y_offset; - double x_offset; -}; - -class LIBGTKMM2EXT_API CairoCharCell : public CairoTextCell -{ - public: - CairoCharCell(int32_t id, char c); - - void set_size (Cairo::RefPtr<Cairo::Context>& context); -}; - -class LIBGTKMM2EXT_API CairoEditableText : public Gtk::Misc -{ -public: - CairoEditableText (boost::shared_ptr<CairoFontDescription> font = boost::shared_ptr<CairoFontDescription>()); - ~CairoEditableText (); - - void add_cell (CairoCell*); - void clear_cells (); - - void start_editing (CairoCell*); - void stop_editing (); - - void set_text (CairoTextCell* cell, const std::string&); - void set_width_chars (CairoTextCell* cell, uint32_t); - - void set_draw_background (bool yn) { _draw_bg = yn; } - - void set_colors (double cr, double cg, double cb, double ca) { - r = cr; - g = cg; - b = cb; - a = ca; - queue_draw (); - } - - void set_edit_colors (double cr, double cg, double cb, double ca) { - edit_r = cr; - edit_g = cg; - edit_b = cb; - edit_a = ca; - queue_draw (); - } - - void set_bg (double r, double g, double b, double a) { - bg_r = r; - bg_g = g; - bg_b = b; - bg_a = a; - queue_draw (); - } - - double xpad() const { return _xpad; } - void set_xpad (double x) { _xpad = x; queue_resize(); } - double ypad() const { return _ypad; } - void set_ypad (double y) { _ypad = y; queue_resize(); } - - double corner_radius() const { return _corner_radius; } - void set_corner_radius (double r) { _corner_radius = r; queue_draw (); } - - boost::shared_ptr<CairoFontDescription> font() const { return _font; } - void set_font (boost::shared_ptr<CairoFontDescription> font); - void set_font (Pango::FontDescription& font); - - sigc::signal<bool,GdkEventScroll*,CairoCell*> scroll; - sigc::signal<bool,GdkEventButton*,CairoCell*> button_press; - sigc::signal<bool,GdkEventButton*,CairoCell*> button_release; - -protected: - bool on_expose_event (GdkEventExpose*); - bool on_button_press_event (GdkEventButton*); - bool on_button_release_event (GdkEventButton*); - void on_size_request (GtkRequisition*); - bool on_focus_in_event (GdkEventFocus*); - bool on_focus_out_event (GdkEventFocus*); - bool on_scroll_event (GdkEventScroll*); - void on_size_allocate (Gtk::Allocation&); - -private: - typedef std::vector<CairoCell*> CellMap; - - CellMap cells; - boost::shared_ptr<CairoFontDescription> _font; - CairoCell* editing_cell; - bool _draw_bg; - double max_cell_width; - double max_cell_height; - double _corner_radius; - double _xpad; - double _ypad; - double r; - double g; - double b; - double a; - double edit_r; - double edit_g; - double edit_b; - double edit_a; - double bg_r; - double bg_g; - double bg_b; - double bg_a; - - CairoCell* find_cell (uint32_t x, uint32_t y); - void queue_draw_cell (CairoCell* target); - void position_cells_and_get_bbox (GdkRectangle&); - void set_cell_sizes (); -}; - -#endif /* __libgtmm2ext_cairocell_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/fader.h b/libs/gtkmm2ext/gtkmm2ext/fader.h deleted file mode 100644 index ec6df5384b..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/fader.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __gtkmm2ext_fader_h__ -#define __gtkmm2ext_fader_h__ - -#include <cmath> -#include <stdint.h> - -#include <gtkmm/adjustment.h> -#include <gdkmm.h> -#include <gtkmm2ext/binding_proxy.h> -#include "gtkmm2ext/cairo_widget.h" - -#include <boost/shared_ptr.hpp> - -#include "gtkmm2ext/visibility.h" - -namespace Gtkmm2ext { - -class LIBGTKMM2EXT_API Fader : public CairoWidget -{ - public: - Fader (Gtk::Adjustment& adjustment, - const Glib::RefPtr<Gdk::Pixbuf>& face_pixbuf, - const Glib::RefPtr<Gdk::Pixbuf>& active_face_pixbuf, - const Glib::RefPtr<Gdk::Pixbuf>& underlay_pixbuf, - const Glib::RefPtr<Gdk::Pixbuf>& handle_pixbuf, - const Glib::RefPtr<Gdk::Pixbuf>& active_handle_pixbuf, - int min_pos_x, - int min_pos_y, - int max_pos_x, - int max_pos_y, - bool read_only); - - virtual ~Fader (); - - void set_controllable (boost::shared_ptr<PBD::Controllable> c) { binding_proxy.set_controllable (c); } - void set_default_value (float); - void set_touch_cursor (const Glib::RefPtr<Gdk::Pixbuf>& touch_cursor); - void get_image_scales (double &x_scale, double &y_scale); - - protected: - void get_handle_position (double& x, double& y); - - void on_size_request (GtkRequisition*); - void on_size_allocate (Gtk::Allocation& alloc); - - void render (Cairo::RefPtr<Cairo::Context> const&, cairo_rectangle_t*); - bool on_button_press_event (GdkEventButton*); - bool on_button_release_event (GdkEventButton*); - bool on_motion_notify_event (GdkEventMotion*); - bool on_scroll_event (GdkEventScroll* ev); - bool on_enter_notify_event (GdkEventCrossing* ev); - bool on_leave_notify_event (GdkEventCrossing* ev); - - protected: - Gtk::Adjustment& adjustment; - BindingProxy binding_proxy; - - private: - - const Glib::RefPtr<Gdk::Pixbuf> _face_pixbuf; - const Glib::RefPtr<Gdk::Pixbuf> _active_face_pixbuf; - const Glib::RefPtr<Gdk::Pixbuf> _underlay_pixbuf; - const Glib::RefPtr<Gdk::Pixbuf> _handle_pixbuf; - const Glib::RefPtr<Gdk::Pixbuf> _active_handle_pixbuf; - int _min_pos_x; - int _min_pos_y; - int _max_pos_x; - int _max_pos_y; - - bool _hovering; - - GdkWindow* _grab_window; - Gdk::Cursor *_touch_cursor; - - double _grab_start_mouse_x; - double _grab_start_mouse_y; - double _grab_start_handle_x; - double _grab_start_handle_y; - double _last_drawn_x; - double _last_drawn_y; - bool _dragging; - float _default_value; - bool _read_only; - - void adjustment_changed (); - void update_unity_position (); -}; - - -} /* namespace */ - -#endif /* __gtkmm2ext_fader_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/grouped_buttons.h b/libs/gtkmm2ext/gtkmm2ext/grouped_buttons.h deleted file mode 100644 index 15b01bff4f..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/grouped_buttons.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2001 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __gtkmm2ext_grouped_buttons_h__ -#define __gtkmm2ext_grouped_buttons_h__ - -#include <stdint.h> - -#include <vector> -#include <sigc++/signal.h> - -#include "gtkmm2ext/visibility.h" - -namespace Gtk { - class ToggleButton; -}; - -class LIBGTKMM2EXT_API GroupedButtons : public sigc::trackable -{ - public: - GroupedButtons (uint32_t nbuttons, uint32_t first_active); - GroupedButtons (std::vector<Gtk::ToggleButton *>&); - - Gtk::ToggleButton& button (uint32_t which) { - return *buttons[which]; - } - - private: - std::vector<Gtk::ToggleButton *> buttons; - uint32_t current_active; - void one_clicked (uint32_t which); -}; - -#endif /* __gtkmm2ext_grouped_buttons_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h b/libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h deleted file mode 100644 index 15a8cb13f7..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __gtkmm2ext_idle_adjustment_h__ -#define __gtkmm2ext_idle_adjustment_h__ - -#include <stdint.h> -#include <sys/time.h> - -#include <gtkmm/adjustment.h> - -#include "gtkmm2ext/visibility.h" - -namespace Gtkmm2ext { - -class LIBGTKMM2EXT_API IdleAdjustment : public sigc::trackable -{ - public: - IdleAdjustment (Gtk::Adjustment& adj); - ~IdleAdjustment (); - - sigc::signal<void> value_changed; - - private: - void underlying_adjustment_value_changed(); - int64_t last_vc; - gint timeout_handler(); - bool timeout_queued; -}; - -} - -#endif /* __gtkmm2ext_idle_adjustment_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/pixscroller.h b/libs/gtkmm2ext/gtkmm2ext/pixscroller.h deleted file mode 100644 index 0a0d2593c7..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/pixscroller.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __gtkmm2ext_pixscroller_h__ -#define __gtkmm2ext_pixscroller_h__ - -#include <gtkmm/drawingarea.h> -#include <gtkmm/adjustment.h> -#include <gdkmm.h> - -#include "gtkmm2ext/visibility.h" - -namespace Gtkmm2ext { - -class LIBGTKMM2EXT_API PixScroller : public Gtk::DrawingArea -{ - public: - PixScroller(Gtk::Adjustment& adjustment, - Glib::RefPtr<Gdk::Pixbuf> slider, - Glib::RefPtr<Gdk::Pixbuf> rail); - - bool on_expose_event (GdkEventExpose*); - bool on_motion_notify_event (GdkEventMotion*); - bool on_button_press_event (GdkEventButton*); - bool on_button_release_event (GdkEventButton*); - bool on_scroll_event (GdkEventScroll*); - void on_size_request (GtkRequisition*); - - protected: - Gtk::Adjustment& adj; - - private: - - Cairo::RefPtr< Cairo::Context > rail_context; - Cairo::RefPtr< Cairo::ImageSurface > rail_surface; - Glib::RefPtr<Gdk::Pixbuf> rail; - Cairo::RefPtr< Cairo::Context > slider_context; - Cairo::RefPtr< Cairo::ImageSurface > slider_surface; - Glib::RefPtr<Gdk::Pixbuf> slider; - Gdk::Rectangle sliderrect; - Gdk::Rectangle railrect; - GdkWindow* grab_window; - double grab_y; - double grab_start; - int overall_height; - bool dragging; - - float default_value; - - void adjustment_changed (); -}; - -} // namespace - -#endif /* __gtkmm2ext_pixscroller_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/selector.h b/libs/gtkmm2ext/gtkmm2ext/selector.h deleted file mode 100644 index 9e511dd89c..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/selector.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - Copyright (C) 1999 Paul Barton-Davis - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __gtkselector_h__ -#define __gtkselector_h__ - -#ifdef interface -#undef interface -#endif - -#include <string> -#include <vector> - -#include <gtkmm.h> - -#include "gtkmm2ext/visibility.h" - -namespace Gtkmm2ext { - -class LIBGTKMM2EXT_API TreeView_Selector : public Gtk::TreeView -{ -public: - TreeView_Selector() {} - virtual ~TreeView_Selector() {} - -protected: - virtual bool on_button_press_event(GdkEventButton *ev); -}; - -typedef void (SelectorRefillFunction)(Glib::RefPtr<Gtk::ListStore>, void *); - -class LIBGTKMM2EXT_API Selector : public Gtk::VBox -{ - friend class Gtkmm2ext::TreeView_Selector; - -public: - Selector (SelectorRefillFunction, void *arg, - std::vector<std::string> titles); - - virtual ~Selector (); - Glib::RefPtr<Gtk::ListStore> liststore () { return lstore; } - void reset (void (*refiller)(Glib::RefPtr<Gtk::ListStore>, void *), void *arg); - void set_size (unsigned int w, unsigned int h) { - scroll.set_size_request (w, h); - tview.columns_autosize (); - } - - struct Result { - Gtk::TreeView& view; - Glib::RefPtr<Gtk::TreeSelection> selection; - - Result (Gtk::TreeView& v, Glib::RefPtr<Gtk::TreeSelection> sel) - : view (v), selection (sel) {} - }; - - /* selection is activated via a double click, choice via - a single click. - */ - sigc::signal<void,Result*> selection_made; - sigc::signal<void,Result*> choice_made; - sigc::signal<void,Result*> shift_made; - sigc::signal<void,Result*> control_made; - - sigc::signal<void> update_contents; - - void accept(); - void cancel(); - void rescan(); - - - protected: - virtual void on_map (); - virtual void on_show (); - - private: - Gtk::ScrolledWindow scroll; - Gtk::TreeModel::ColumnRecord column_records; - Glib::RefPtr<Gtk::ListStore> lstore; - Gtkmm2ext::TreeView_Selector tview; - void (*refiller)(Glib::RefPtr<Gtk::ListStore>, void *); - void *refill_arg; - gint selected_row; - gint selected_column; - - void refill (); - void chosen (); - void shift_clicked (); - void control_clicked (); - - static gint _accept (gpointer); - static gint _chosen (gpointer); - static gint _shift_clicked (gpointer); - static gint _control_clicked (gpointer); - -}; - -} /* namespace */ - -#endif // __gtkselector_h__ diff --git a/libs/gtkmm2ext/gtkmm2ext/tabbable.h b/libs/gtkmm2ext/gtkmm2ext/tabbable.h index d7e1429ada..12363ccbe1 100644 --- a/libs/gtkmm2ext/gtkmm2ext/tabbable.h +++ b/libs/gtkmm2ext/gtkmm2ext/tabbable.h @@ -27,7 +27,6 @@ #include <gtkmm/label.h> #include <gtkmm/notebook.h> -#include "gtkmm2ext/cairo_icon.h" #include "gtkmm2ext/window_proxy.h" #include "gtkmm2ext/visibility.h" |