summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES1
-rw-r--r--FL/Fl_Group.H4
-rw-r--r--FL/Fl_Widget.H10
-rw-r--r--FL/Fl_Window.H7
-rw-r--r--src/Fl_Group.cxx6
-rw-r--r--src/Fl_Tile.cxx8
6 files changed, 19 insertions, 17 deletions
diff --git a/CHANGES b/CHANGES
index e8b5cfa81..e8a87ad18 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,6 @@
CHANGES IN FLTK 1.3.0
+ - changed widget coordinates to 32 bit
- added support for shortcuts for Fl_Input_,
Fl_Value_Input, and Fl_Text_Display derived
widgets (STR #1770)
diff --git a/FL/Fl_Group.H b/FL/Fl_Group.H
index ac1ad0876..c140b3c5c 100644
--- a/FL/Fl_Group.H
+++ b/FL/Fl_Group.H
@@ -38,7 +38,7 @@ class FL_EXPORT Fl_Group : public Fl_Widget {
Fl_Widget* savedfocus_;
Fl_Widget* resizable_;
int children_;
- short *sizes_; // remembered initial sizes of children
+ int *sizes_; // remembered initial sizes of children
int navigation(int);
static Fl_Group *current_;
@@ -58,7 +58,7 @@ protected:
void draw_children();
void draw_outside_label(const Fl_Widget&) const ;
void update_child(Fl_Widget&) const;
- short* sizes();
+ int *sizes();
public:
diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H
index f4c7b1d89..0fee9f311 100644
--- a/FL/Fl_Widget.H
+++ b/FL/Fl_Widget.H
@@ -58,7 +58,7 @@ class FL_EXPORT Fl_Widget {
Fl_Group* parent_;
Fl_Callback* callback_;
void* user_data_;
- short x_,y_,w_,h_;
+ int x_,y_,w_,h_;
Fl_Label label_;
int flags_;
unsigned color_;
@@ -79,10 +79,10 @@ protected:
Fl_Widget(int,int,int,int,const char* =0);
- void x(int v) {x_ = (short)v;}
- void y(int v) {y_ = (short)v;}
- void w(int v) {w_ = (short)v;}
- void h(int v) {h_ = (short)v;}
+ void x(int v) {x_ = v;}
+ void y(int v) {y_ = v;}
+ void w(int v) {w_ = v;}
+ void h(int v) {h_ = v;}
int flags() const {return flags_;}
void set_flag(int c) {flags_ |= c;}
diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H
index 9006d4766..2d518ac0e 100644
--- a/FL/Fl_Window.H
+++ b/FL/Fl_Window.H
@@ -44,8 +44,9 @@ class FL_EXPORT Fl_Window : public Fl_Group {
const char* xclass_;
const void* icon_;
// size_range stuff:
- short minw, minh, maxw, maxh;
- uchar dw, dh, aspect, size_range_set;
+ int minw, minh, maxw, maxh;
+ int dw, dh, aspect;
+ uchar size_range_set;
// cursor stuff
Fl_Cursor cursor_default;
Fl_Color cursor_fg, cursor_bg;
@@ -94,7 +95,7 @@ public:
void hotspot(const Fl_Widget& p, int offscreen = 0) {hotspot(&p,offscreen);}
void free_position() {clear_flag(FL_FORCE_POSITION);}
void size_range(int a, int b, int c=0, int d=0, int e=0, int f=0, int g=0) {
- minw=(short)a; minh=(short)b; maxw=(short)c; maxh=(short)d; dw=(uchar)e; dh=(uchar)f; aspect=(uchar)g; size_range_();}
+ minw=a; minh=b; maxw=c; maxh=d; dw=e; dh=f; aspect=g; size_range_();}
const char* label() const {return Fl_Widget::label();}
const char* iconlabel() const {return iconlabel_;}
diff --git a/src/Fl_Group.cxx b/src/Fl_Group.cxx
index 5768bedb5..c5656e615 100644
--- a/src/Fl_Group.cxx
+++ b/src/Fl_Group.cxx
@@ -428,9 +428,9 @@ void Fl_Group::init_sizes() {
delete[] sizes_; sizes_ = 0;
}
-short* Fl_Group::sizes() {
+int *Fl_Group::sizes() {
if (!sizes_) {
- short* p = sizes_ = new short[4*(children_+2)];
+ int *p = sizes_ = new int[4*(children_+2)];
// first thing in sizes array is the group's size:
if (type() < FL_WINDOW) {p[0] = x(); p[2] = y();} else {p[0] = p[2] = 0;}
p[1] = p[0]+w(); p[3] = p[2]+h();
@@ -477,7 +477,7 @@ void Fl_Group::resize(int X, int Y, int W, int H) {
} else if (children_) {
- short* p = sizes();
+ int *p = sizes();
// get changes in size/position from the initial size:
int dx = X - p[0];
diff --git a/src/Fl_Tile.cxx b/src/Fl_Tile.cxx
index 2c70ea513..ca94ffae0 100644
--- a/src/Fl_Tile.cxx
+++ b/src/Fl_Tile.cxx
@@ -39,7 +39,7 @@
void Fl_Tile::position(int oix, int oiy, int newx, int newy) {
Fl_Widget*const* a = array();
- short* p = sizes();
+ int *p = sizes();
p += 8; // skip group & resizable's saved size
for (int i=children(); i--; p += 4) {
Fl_Widget* o = *a++;
@@ -73,7 +73,7 @@ void Fl_Tile::resize(int X,int Y,int W,int H) {
int dy = Y-y();
int dw = W-w();
int dh = H-h();
- short* p = sizes();
+ int *p = sizes();
// resize this (skip the Fl_Group resize):
Fl_Widget::resize(X,Y,W,H);
// find bottom-right of resiable:
@@ -138,8 +138,8 @@ int Fl_Tile::handle(int event) {
int oldx = 0;
int oldy = 0;
Fl_Widget*const* a = array();
- short* q = sizes();
- short* p = q+8;
+ int *q = sizes();
+ int *p = q+8;
for (int i=children(); i--; p += 4) {
Fl_Widget* o = *a++;
if (o == resizable()) continue;