diff options
Diffstat (limited to 'libs/gtkmm2ext/gtkmm2ext')
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/ardour_icon.h | 48 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/binding_proxy.h | 63 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/choice.h | 46 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/eventboxext.h | 59 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/pane.h | 134 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/paths_dialog.h | 57 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/popup.h | 65 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/prompter.h | 78 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/scroomer.h | 93 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/stateful_button.h | 95 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/tabbable.h | 100 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/tearoff.h | 92 |
12 files changed, 0 insertions, 930 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/ardour_icon.h b/libs/gtkmm2ext/gtkmm2ext/ardour_icon.h deleted file mode 100644 index 255097d79a..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/ardour_icon.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef _gtkmm2ext_ardour_icon_h_ -#define _gtkmm2ext_ardour_icon_h_ - -#include <stdint.h> -#include <cairo.h> -#include "gtkmm2ext/widget_state.h" - -namespace Gtkmm2ext { namespace ArdourIcon { - enum Icon { - NoIcon, - RecButton, - RecTapeMode, - CloseCross, - StripWidth, - DinMidi, - TransportStop, - TransportPlay, - TransportLoop, - TransportRange, - TransportStart, - TransportEnd, - TransportPanic, - TransportMetronom, - NudgeLeft, - NudgeRight, - ZoomIn, - ZoomOut, - ZoomFull, - ZoomExpand, - TimeAxisShrink, - TimeAxisExpand, - ToolGrab, - ToolRange, - ToolCut, - ToolStretch, - ToolAudition, - ToolDraw, - ToolContent, - }; - - LIBGTKMM2EXT_API bool render (cairo_t *cr, - const enum Icon icon, - const int width, const int height, - const Gtkmm2ext::ActiveState state, - const uint32_t fg_color); -}; }; - -#endif diff --git a/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h b/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h deleted file mode 100644 index 7108c46eb2..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h +++ /dev/null @@ -1,63 +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. - - $Id$ -*/ - -#ifndef __binding_proxy__ -#define __binding_proxy__ - -#include <string> -#include <boost/shared_ptr.hpp> - -#include "pbd/signals.h" - -#include "gtkmm2ext/visibility.h" -#include "gtkmm2ext/popup.h" - -namespace PBD { - class Controllable; -} - -class LIBGTKMM2EXT_API BindingProxy : public sigc::trackable -{ - public: - BindingProxy (boost::shared_ptr<PBD::Controllable>); - BindingProxy (); - virtual ~BindingProxy(); - - void set_bind_button_state (guint button, guint statemask); - - static bool is_bind_action (GdkEventButton *); - bool button_press_handler (GdkEventButton *); - - boost::shared_ptr<PBD::Controllable> get_controllable() const { return controllable; } - void set_controllable (boost::shared_ptr<PBD::Controllable>); - - protected: - Gtkmm2ext::PopUp* prompter; - boost::shared_ptr<PBD::Controllable> controllable; - - static guint bind_button; - static guint bind_statemask; - - PBD::ScopedConnection learning_connection; - void learning_finished (); - bool prompter_hiding (GdkEventAny *); -}; - -#endif diff --git a/libs/gtkmm2ext/gtkmm2ext/choice.h b/libs/gtkmm2ext/gtkmm2ext/choice.h deleted file mode 100644 index 3a888f2b9d..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/choice.h +++ /dev/null @@ -1,46 +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 __pbd_gtkmm_choice_h__ -#define __pbd_gtkmm_choice_h__ - -#include <gtkmm/dialog.h> -#include <gtkmm/image.h> -#include <gtkmm/stock.h> -#include <gtkmm/box.h> -#include <string> -#include <vector> - -#include "gtkmm2ext/visibility.h" - -namespace Gtkmm2ext { - -class LIBGTKMM2EXT_API Choice : public Gtk::Dialog -{ - public: - Choice (std::string title, std::string prompt, std::vector<std::string> choices, bool center = true); - virtual ~Choice (); - - protected: - void on_realize (); -}; - -} /* namespace */ - -#endif // __pbd_gtkmm_choice_h__ diff --git a/libs/gtkmm2ext/gtkmm2ext/eventboxext.h b/libs/gtkmm2ext/gtkmm2ext/eventboxext.h deleted file mode 100644 index a1a53fbdfa..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/eventboxext.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2017 Robin Gareus <robin@gareus.org> - * - * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef __gtkmm2ext_eventbox_ext_h__ -#define __gtkmm2ext_eventbox_ext_h__ - -#include <gtkmm/eventbox.h> - -#include "gtkmm2ext/visibility.h" - -namespace Gtkmm2ext { - -class LIBGTKMM2EXT_API EventBoxExt : public Gtk::EventBox -{ -public: - EventBoxExt (); - virtual ~EventBoxExt () {} - -protected: - /* gtk2's gtk/gtkcontainer.c does not - * unmap child widgets if the container has a window. - * - * (this is for historical reasons and optimization - * because back in the day each GdkWindow was backed by - * an actual windowing system surface). - * - * In Ardour's case an EventBox is used in the Editor's top-level - * and child-widgets (e.g. Canvas::GtkCanvas never receive an unmap. - * - * However, when switching Tabbable pages, we do need to hide overlays - * such as ArdourCanvasOpenGLView - * - */ - void on_unmap () { - Gtk::EventBox::on_unmap(); - if (get_child ()) { - get_child()->unmap(); - } - } -}; - -} /* namespace */ - -#endif diff --git a/libs/gtkmm2ext/gtkmm2ext/pane.h b/libs/gtkmm2ext/gtkmm2ext/pane.h deleted file mode 100644 index 88eb82041b..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/pane.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - Copyright (C) 2016 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 __libgtkmm2ext_pane_h__ -#define __libgtkmm2ext_pane_h__ - -#include <vector> -#include <algorithm> -#include <boost/shared_ptr.hpp> - -#include <stdint.h> - -#include <gdkmm/cursor.h> -#include <gtkmm/container.h> -#include <gtkmm/eventbox.h> - -#include "gtkmm2ext/visibility.h" - -namespace Gtk { - class Widget; -} - -namespace Gtkmm2ext { - -class LIBGTKMM2EXT_API Pane : public Gtk::Container -{ - private: - class Divider; - - - public: - struct Child - { - Pane* pane; - Gtk::Widget* w; - int32_t minsize; - sigc::connection show_con; - sigc::connection hide_con; - - Child (Pane* p, Gtk::Widget* widget, uint32_t ms) : pane (p), w (widget), minsize (ms) {} - }; - - typedef std::vector<boost::shared_ptr<Child> > Children; - - Pane (bool horizontal); - ~Pane(); - - void set_divider (std::vector<float>::size_type divider, float fract); - float get_divider (std::vector<float>::size_type divider = 0); - void set_child_minsize (Gtk::Widget const &, int32_t); - - GType child_type_vfunc() const; - void set_drag_cursor (Gdk::Cursor); - - void set_check_divider_position (bool); - - protected: - bool horizontal; - - void on_add (Gtk::Widget*); - void on_remove (Gtk::Widget*); - void on_size_request (GtkRequisition*); - void on_size_allocate (Gtk::Allocation&); - bool on_expose_event (GdkEventExpose*); - - bool handle_press_event (GdkEventButton*, Divider*); - bool handle_release_event (GdkEventButton*, Divider*); - bool handle_motion_event (GdkEventMotion*, Divider*); - bool handle_enter_event (GdkEventCrossing*, Divider*); - bool handle_leave_event (GdkEventCrossing*, Divider*); - - void forall_vfunc (gboolean include_internals, GtkCallback callback, gpointer callback_data); - - private: - Gdk::Cursor drag_cursor; - bool did_move; - - void reallocate (Gtk::Allocation const &); - - Children children; - - struct Divider : public Gtk::EventBox { - Divider (); - - float fract; - bool dragging; - - bool on_expose_event (GdkEventExpose* ev); - }; - - typedef std::list<Divider*> Dividers; - Dividers dividers; - int divider_width; - bool check_fract; - - void add_divider (); - void handle_child_visibility (); - float constrain_fract (Dividers::size_type, float fract); - - static void* notify_child_destroyed (void*); - void* child_destroyed (Gtk::Widget*); -}; - -class LIBGTKMM2EXT_API HPane : public Pane -{ - public: - HPane () : Pane (true) {} -}; - -class LIBGTKMM2EXT_API VPane : public Pane -{ - public: - VPane () : Pane (false) {} -}; - -} /* namespace */ - -#endif /* __libgtkmm2ext_pane_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/paths_dialog.h b/libs/gtkmm2ext/gtkmm2ext/paths_dialog.h deleted file mode 100644 index 120d037a27..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/paths_dialog.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2014 Robin Gareus <robin@gareus.org> - - 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 __gtkmmext_paths_dialog_h__ -#define __gtkmmext_paths_dialog_h__ - -#include <string> -#include <vector> -#include <gtkmm.h> - -#include "gtkmm2ext/visibility.h" - -namespace Gtkmm2ext { - -class LIBGTKMM2EXT_API PathsDialog : public Gtk::Dialog -{ - public: - PathsDialog (Gtk::Window& parent, std::string, std::string current_paths = "", std::string default_paths = ""); - ~PathsDialog (); - - std::string get_serialized_paths (); - - private: - void on_show (); - - Gtk::ListViewText paths_list_view; - - Gtk::Button add_path_button; - Gtk::Button remove_path_button; - Gtk::Button set_default_button; - - void selection_changed(); - void add_path(); - void remove_path(); - void set_default(); - - std::string _default_paths; -}; - -} /* namespace */ - -#endif /* __gtkmmext_paths_dialog_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/popup.h b/libs/gtkmm2ext/gtkmm2ext/popup.h deleted file mode 100644 index 043c563605..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/popup.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright (C) 1998-99 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 __qui_popup_h__ -#define __qui_popup_h__ - -#ifdef interface -#undef interface -#endif - -#include <string> -#include <gtkmm.h> - -#include <pbd/touchable.h> - -#include "gtkmm2ext/visibility.h" - -namespace Gtkmm2ext { - -class LIBGTKMM2EXT_API PopUp : public Gtk::Window, public Touchable -{ - public: - PopUp (Gtk::WindowPosition pos, unsigned int show_for_msecs = 0, - bool delete_on_hide = false); - virtual ~PopUp (); - void touch (); - void remove (); - void set_text (std::string); - void set_name (std::string); - gint button_click (GdkEventButton *); - - bool on_delete_event (GdkEventAny* ); - - protected: - void on_realize (); - - private: - Gtk::Label label; - std::string my_text; - gint timeout; - static gint remove_prompt_timeout (void *); - bool delete_on_hide; - unsigned int popdown_time; - -}; - -} /* namespace */ - -#endif // __qui_popup_h__ diff --git a/libs/gtkmm2ext/gtkmm2ext/prompter.h b/libs/gtkmm2ext/gtkmm2ext/prompter.h deleted file mode 100644 index 59bad4b998..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/prompter.h +++ /dev/null @@ -1,78 +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 __gtkmm2ext_prompter_h__ -#define __gtkmm2ext_prompter_h__ - -#include <string> -#include <gtkmm/box.h> -#include <gtkmm/entry.h> -#include <gtkmm/label.h> -#include <gtkmm/dialog.h> -#include <sigc++/sigc++.h> - -#include "gtkmm2ext/visibility.h" - -namespace Gtk { - class Window; -} - -namespace Gtkmm2ext { - -class LIBGTKMM2EXT_API Prompter : public Gtk::Dialog - -{ - public: - Prompter (bool modal = false); - Prompter (Gtk::Window& parent, bool modal = false); - ~Prompter () {}; - - void set_prompt (std::string prompt) { - entryLabel.set_label (prompt); - } - - void set_initial_text (std::string txt) { - entry.set_text (txt); - entry.select_region (0, entry.get_text_length()); - } - - void change_labels (std::string ok, std::string cancel); - - void get_result (std::string &str, bool strip=true); - - protected: - Gtk::Entry& the_entry() { return entry; } - - void on_entry_changed (); - void on_show (); - - private: - Gtk::Entry entry; - Gtk::HBox entryBox; - Gtk::Label entryLabel; - bool first_show; - bool can_accept_from_entry; - - void init (); - void entry_activated (); -}; - -} /* namespace */ - -#endif /* __gtkmm2ext_prompter_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/scroomer.h b/libs/gtkmm2ext/gtkmm2ext/scroomer.h deleted file mode 100644 index 4d957b4868..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/scroomer.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - Copyright (C) 2008 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_scroomer_h__ -#define __gtkmm2ext_scroomer_h__ - -#include <gtkmm/drawingarea.h> -#include <gtkmm/adjustment.h> -#include <gdkmm.h> - -#include "gtkmm2ext/visibility.h" - -namespace Gtkmm2ext { - -class LIBGTKMM2EXT_API Scroomer : public Gtk::DrawingArea -{ -public: - enum Component { - TopBase = 0, - Handle1 = 1, - Slider = 2, - Handle2 = 3, - BottomBase = 4, - Total = 5, - None = 6 - }; - - Scroomer(Gtk::Adjustment& adjustment); - ~Scroomer(); - - bool on_motion_notify_event (GdkEventMotion*); - bool on_button_press_event (GdkEventButton*); - bool on_button_release_event (GdkEventButton*); - bool on_scroll_event (GdkEventScroll*); - virtual void on_size_allocate (Gtk::Allocation&); - - void set_comp_rect(GdkRectangle&, Component) const; - - Component point_in(double point) const; - - void set_min_page_size(double page_size); - int get_handle_size() { return handle_size; } - - inline int position_of(Component comp) { return position[comp]; } - - sigc::signal0<void> DragStarting; - sigc::signal0<void> DragFinishing; - - sigc::signal0<void> DoubleClicked; - -protected: - Gtk::Adjustment& adj; - -private: - struct UpdateRect { - GdkRectangle rect; - Component first_comp; - }; - - void update(); - void adjustment_changed (); - - int position[6]; - int old_pos[6]; - int handle_size; - double min_page_size; - GdkWindow* grab_window; - Component grab_comp; - double grab_y; - double unzoomed_val; - double unzoomed_page; - bool pinch; -}; - -} // namespace - -#endif /* __gtkmm2ext_scroomer_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/stateful_button.h b/libs/gtkmm2ext/gtkmm2ext/stateful_button.h deleted file mode 100644 index 63d6890df4..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/stateful_button.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - Copyright (C) 2005 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 __pbd_gtkmm_abutton_h__ -#define __pbd_gtkmm_abutton_h__ - -#include <vector> - -#include <gtkmm/togglebutton.h> - -#include "gtkmm2ext/visibility.h" - -namespace Gtkmm2ext { - -class LIBGTKMM2EXT_API StateButton -{ - public: - StateButton(); - virtual ~StateButton() {} - - void set_visual_state (int); - int get_visual_state () { return visual_state; } - void set_self_managed (bool yn) { _self_managed = yn; } - virtual void set_widget_name (const std::string& name) = 0; - - protected: - int visual_state; - bool _self_managed; - bool _is_realized; - bool style_changing; - Gtk::StateType state_before_prelight; - bool is_toggle; - - virtual std::string get_widget_name() const = 0; - virtual Gtk::Widget* get_child_widget () = 0; - - void avoid_prelight_on_style_changed (const Glib::RefPtr<Gtk::Style>& style, GtkWidget* widget); - void avoid_prelight_on_state_changed (Gtk::StateType old_state, GtkWidget* widget); -}; - - -class LIBGTKMM2EXT_API StatefulToggleButton : public StateButton, public Gtk::ToggleButton -{ - public: - StatefulToggleButton(); - explicit StatefulToggleButton(const std::string &label); - ~StatefulToggleButton() {} - void set_widget_name (const std::string& name); - - protected: - void on_realize (); - void on_toggled (); - void on_style_changed (const Glib::RefPtr<Gtk::Style>& style); - void on_state_changed (Gtk::StateType old_state); - - Gtk::Widget* get_child_widget (); - std::string get_widget_name() const { return get_name(); } -}; - -class LIBGTKMM2EXT_API StatefulButton : public StateButton, public Gtk::Button -{ - public: - StatefulButton(); - explicit StatefulButton(const std::string &label); - virtual ~StatefulButton() {} - void set_widget_name (const std::string& name); - - protected: - void on_realize (); - void on_style_changed (const Glib::RefPtr<Gtk::Style>& style); - void on_state_changed (Gtk::StateType old_state); - - Gtk::Widget* get_child_widget (); - std::string get_widget_name() const { return get_name(); } -}; - -}; - -#endif diff --git a/libs/gtkmm2ext/gtkmm2ext/tabbable.h b/libs/gtkmm2ext/gtkmm2ext/tabbable.h deleted file mode 100644 index 12363ccbe1..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/tabbable.h +++ /dev/null @@ -1,100 +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 __gtkmm2ext_tabbable_h__ -#define __gtkmm2ext_tabbable_h__ - -#include <gtkmm/bin.h> -#include <gtkmm/box.h> -#include <gtkmm/button.h> -#include <gtkmm/image.h> -#include <gtkmm/label.h> -#include <gtkmm/notebook.h> - -#include "gtkmm2ext/window_proxy.h" -#include "gtkmm2ext/visibility.h" - -namespace Gtk { - class Window; - class Notebook; -} - -namespace Gtkmm2ext { - -class VisibilityTracker; - -class LIBGTKMM2EXT_API Tabbable : public WindowProxy { - public: - Tabbable (Gtk::Widget&, const std::string&, bool tabbed_by_default = true); - ~Tabbable (); - - void add_to_notebook (Gtk::Notebook& notebook, const std::string& tab_title); - void make_visible (); - void make_invisible (); - void change_visibility (); - void attach (); - void detach (); - - Gtk::Widget& contents() const { return _contents; } - - Gtk::Window* get (bool create = false); - Gtk::Window* own_window () { return get (false); } - virtual Gtk::Window* use_own_window (bool and_pack_it); - - void set_default_tabbed (bool yn); - - virtual void show_window (); - - bool window_visible () const; - bool tabbed() const; - bool tabbed_by_default () const; - - Gtk::Window* current_toplevel () const; - - Gtk::Notebook* tab_root_drop (); - - int set_state (const XMLNode&, int version); - XMLNode& get_state (); - - static std::string xml_node_name(); - - sigc::signal1<void,Tabbable&> StateChange; - - protected: - bool delete_event_handler (GdkEventAny *ev); - - private: - Gtk::Widget& _contents; - Gtk::Notebook _own_notebook; - Gtk::Notebook* _parent_notebook; - std::string _tab_title; - bool tab_requested_by_state; - - void show_tab (); - void hide_tab (); - bool tab_close_clicked (GdkEventButton*); - void show_own_window (bool and_pack_it); - void window_mapped (); - void window_unmapped (); -}; - - -} - -#endif diff --git a/libs/gtkmm2ext/gtkmm2ext/tearoff.h b/libs/gtkmm2ext/gtkmm2ext/tearoff.h deleted file mode 100644 index be5c45d544..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/tearoff.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - Copyright (C) 2003 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 __gtkmm2ext_tearoff_h__ -#define __gtkmm2ext_tearoff_h__ - -#include <gtkmm/window.h> -#include <gtkmm/arrow.h> -#include <gtkmm/box.h> -#include <gtkmm/eventbox.h> - -#include "gtkmm2ext/visibility.h" - -class XMLNode; - -namespace Gtkmm2ext { - -class LIBGTKMM2EXT_API TearOff : public Gtk::HBox -{ - public: - TearOff (Gtk::Widget& contents, bool allow_resize = false); - virtual ~TearOff (); - - void set_visible (bool yn, bool force = false); - void set_can_be_torn_off (bool); - bool can_be_torn_off () const { return _can_be_torn_off; } - bool visible () const { return _visible; } - - sigc::signal<void> Detach; - sigc::signal<void> Attach; - sigc::signal<void> Visible; - sigc::signal<void> Hidden; - - Gtk::Window& tearoff_window() { return own_window; } - bool torn_off() const; - void tear_it_off (); - void put_it_back (); - void hide_visible (); - - void set_state (const XMLNode&); - void add_state (XMLNode&) const; - - private: - Gtk::Widget& contents; - Gtk::Window own_window; - Gtk::Arrow tearoff_arrow; - Gtk::Arrow close_arrow; - Gtk::HBox window_box; - Gtk::EventBox tearoff_event_box; - Gtk::EventBox close_event_box; - double drag_x; - double drag_y; - bool dragging; - bool _visible; - bool _torn; - bool _can_be_torn_off; - int own_window_width; - int own_window_height; - int own_window_xpos; - int own_window_ypos; - - gint tearoff_click (GdkEventButton*); - gint close_click (GdkEventButton*); - - gint window_motion (GdkEventMotion*); - gint window_button_press (GdkEventButton*); - gint window_button_release (GdkEventButton*); - gint window_delete_event (GdkEventAny*); - - void own_window_realized (); - bool own_window_configured (GdkEventConfigure*); -}; - -} /* namespace */ - -#endif // __gtkmm2ext_tearoff_h__ |