scrolledviewport.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PAPYRUS_GTKSCROLLEDVIEWPORT_H
00021 #define PAPYRUS_GTKSCROLLEDVIEWPORT_H
00022
00023 #include <gtkmm/table.h>
00024 #include <papyrus-gtkmm/viewport.h>
00025
00026 namespace Papyrus
00027 {
00028
00029 namespace Gtk
00030 {
00031
00035 class ScrolledViewport : public ::Gtk::Table
00036 {
00037 public:
00038 ScrolledViewport();
00039
00040 ~ScrolledViewport();
00041
00042 ::Gtk::CornerType get_placement() const;
00043
00044 void get_policy ( ::Gtk::PolicyType& hscrollbar_policy, ::Gtk::PolicyType& vscrollbar_policy ) const;
00045
00046 ::Gtk::ShadowType get_shadow_type() const;
00047
00048 void get_hincrements( double& hstep_increment, double& hpage_increment ) const;
00049
00050 void get_vincrements( double& vstep_increment, double& vpage_increment ) const;
00051
00052 void get_increments( double& hstep_increment, double& hpage_increment, double& vstep_increment, double& vpage_increment ) const;
00053
00054 bool get_hscrollbar_visible() const;
00055
00056 bool get_vscrollbar_visible() const;
00057
00058 void set_placement ( ::Gtk::CornerType window_placement );
00059
00060 void set_policy ( ::Gtk::PolicyType hscrollbar_policy, ::Gtk::PolicyType vscrollbar_policy );
00061
00062 void set_shadow_type(::Gtk::ShadowType type);
00063
00064 void set_hincrements( double hstep_increment, double hpage_increment );
00065
00066 void set_vincrements( double vstep_increment, double vpage_increment );
00067
00068 void set_increments( double hstep_increment, double hpage_increment, double vstep_increment, double vpage_increment );
00069
00070
00071
00072
00073 Viewport& viewport();
00074
00075 const Viewport& viewport() const;
00076
00078 Papyrus::Canvas::pointer canvas();
00079
00080 ::Gtk::Button& corner_button();
00081
00082 protected:
00083 double m_x_low, m_x_high, m_y_low, m_y_high;
00084
00085 Canvas::pointer m_canvas;
00086
00087 ::Gtk::CornerType m_corner_type;
00088 ::Gtk::PolicyType m_hscrollbar_policy;
00089 ::Gtk::PolicyType m_vscrollbar_policy;
00090
00091 Viewport m_viewport;
00092 ::Gtk::Frame m_frame;
00093 ::Gtk::Button m_corner;
00094 ::Gtk::HScrollbar m_hscrollbar;
00095 ::Gtk::VScrollbar m_vscrollbar;
00096
00097 Region m_last_global_extents;
00098
00099 sigc::connection m_canvas_extents_connection;
00100 sigc::connection m_canvas_scrolled_connection;
00101 sigc::connection m_canvas_size_connection;
00102
00103 void layout_children(bool construction=false);
00104
00105 void on_canvas_extents_changed();
00106
00107 void on_canvas_scrolled( double x, double y );
00108
00109 bool on_hscrollbar_changed(::Gtk::ScrollType, double);
00110
00111 bool on_vscrollbar_changed(::Gtk::ScrollType, double);
00112
00113 virtual void on_corner_clicked();
00114
00115 void on_canvas_replaced();
00116
00117 };
00118
00119 }
00120
00121 }
00122
00123 #endif