#include <stdint.h>
+#include <gdkmm/cursor.h>
#include <gtkmm/container.h>
#include <gtkmm/eventbox.h>
private:
class Divider;
+
public:
+ struct Child
+ {
+ Pane* pane;
+ Gtk::Widget* w;
+ int32_t minsize;
+
+ Child (Pane* p, Gtk::Widget* widget, uint32_t ms) : pane (p), w (widget), minsize (ms) {}
+ };
+
+ typedef std::list<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*);
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 &);
- typedef std::list<Gtk::Widget*> Children;
Children children;
struct Divider : public Gtk::EventBox {
bool dragging;
bool on_expose_event (GdkEventExpose* ev);
- bool on_enter_notify_event (GdkEventCrossing*);
- bool on_leave_notify_event (GdkEventCrossing*);
};
- typedef std::vector<Divider*> Dividers;
+ typedef std::list<Divider*> Dividers;
Dividers dividers;
int divider_width;
+ bool check_fract;
+
void add_divider ();
+ void handle_child_visibility ();
+ bool fract_is_ok (Dividers::size_type, float fract);
+
+ static void* notify_child_destroyed (void*);
+ void* child_destroyed (Gtk::Widget*);
};
class LIBGTKMM2EXT_API HPane : public Pane