00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
#ifndef _upane_hpp_
00026
#define _upane_hpp_
00027
00028
#include <ubit/uborder.hpp>
00029
#include <ubit/uview.hpp>
00030
00031
00032
00056 class UPane:
public UBox {
00057
public:
00058
static UStyle *style;
00059
00060
UPane(
const UArgs& a = UArgs::none);
00062
00063
friend UPane&
upane(
const UArgs& a = UArgs::none);
00065
00066
virtual ~UPane();
00067
00068
virtual const UStyle& getStyle(UContext*)
const {
return makeStyle();}
00069
static const UStyle& makeStyle();
00070
00071
00072
00073
float getXScroll();
00074
float getYScroll();
00076
00077
void setXScroll(
float _xscroll);
00078
void setYScroll(
float _yscroll);
00079
void setScroll(
float xscroll,
float yscroll);
00081
00082
void scrollImpl(
float new_xscroll,
float new_yscroll,
00083
bool upd_x,
bool upd_y,
bool update_pane);
00085
00086
00087
00088 UBox *
getViewport();
00093
UView *
getViewportView(
UView *pane_view);
00099
class UScrollbar* getVScrollbar();
00100
class UScrollbar*
getHScrollbar();
00102
00103
00104
00114
00115
00116
00117
#ifndef NO_DOC
00118
friend class UPaneView;
00119
00120 UBoxLink* getViewportLink();
00121
void setVScrollbarImpl(
class UScrollbar* vs) {vscrollbar = vs;}
00122
void setHScrollbarImpl(
class UScrollbar* hs) {hscrollbar = hs;}
00123
00124
protected:
00125
class UScrollbar *hscrollbar, *vscrollbar;
00126
float xscroll, yscroll;
00127
00128
virtual void viewResized(
UEvent&);
00129
#endif
00130
};
00131
00132
00133
00134
00138 class UScrollpane:
public UPane {
00139
public:
00140
UScrollpane(
const UArgs& a = UArgs::none);
00144
UScrollpane(
int v_scrollbar_mode,
int h_scrollbar_mode,
00145
const UArgs& a = UArgs::none);
00151
friend UScrollpane&
uscrollpane(
const UArgs& a = UArgs::none);
00153
00154
friend UScrollpane& uscrollpane(
int Vscrollbar_policy,
int Hscrollbar_policy,
00155
const UArgs& a = UArgs::none);
00157
00158
00159
00160
00161
protected:
00162
void constructs(
int vs_mode,
int hs_mode,
const UArgs&);
00163 };
00164
00165
00166
00171 class UPaneView:
public UView {
00172
public:
00173
static UViewStyle style;
00174 virtual UViewStyle*
getViewStyle() {
return &style;}
00175
00176
UPaneView(UBoxLink*,
UView* parview,
UWinGraph*);
00177
virtual ~
UPaneView() {}
00178
00179
static UView*
makeView(UBoxLink*,
UView* parview,
UWinGraph*);
00181
00182
UPane *
getPane();
00184
00185 u_dim getXScroll() {
return xscroll;}
00186 u_dim getYScroll() {
return yscroll;}
00187
00188
virtual void setXScroll(u_dim scr) {xscroll = scr;}
00189 virtual void setYScroll(u_dim scr) {yscroll = scr;}
00191
00192
00193
00194
00195
#ifndef NO_DOC
00196
friend class UPane;
00197
UMargins margins;
00198 u_dim xscroll, yscroll;
00199
#endif
00200
};
00201
00202
#endif
00203
00204
00205