diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2005-07-20 11:33:34 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2005-07-20 11:33:34 +0000 |
| commit | 580ecb0048b266711b6046593c0a46136903de3e (patch) | |
| tree | ee70ec59dadb2a0004beeff8c52c1dc28808d2a1 | |
| parent | a15e974676305949a2312dbafefdcb840cdad3a1 (diff) | |
- Fluid overlay now shows a seperate bounding box of selected
items with correct handles and a dotted boundig box for all
labels (STR #790)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4437 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 3 | ||||
| -rw-r--r-- | fluid/Fl_Window_Type.cxx | 20 |
2 files changed, 18 insertions, 5 deletions
@@ -2,6 +2,9 @@ CHANGES IN FLTK 1.1.7 - Documentation fixes (STR #648, STR #692, STR #730, STR #744, STR #745, STR #942) + - Fluid overlay now shows a seperate bounding box of selected + items with correct handles and a dotted boundig box for all + labels (STR #790) - Fixed left overhang of large chracters in Fl_Input_ (STR #941) - Fixed button resizing in File Chooser (STR #884) - Fixed Fluid redraw issue (STR #912) diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx index 7b6e89f20..44c9f61da 100644 --- a/fluid/Fl_Window_Type.cxx +++ b/fluid/Fl_Window_Type.cxx @@ -658,7 +658,8 @@ void Fl_Window_Type::draw_overlay() { if (selected) fl_rect(0,0,o->w(),o->h()); if (!numselected) return; int mybx,myby,mybr,mybt; - mybx = o->w(); myby = o->h(); mybr = 0; mybt = 0; + int mysx,mysy,mysr,myst; + mybx = mysx = o->w(); myby = mysy = o->h(); mybr = mysr = 0; mybt = myst = 0; Fl_Type *selection = 0L; // used to store the one selected widget (if n==1) for (Fl_Type *q=next; q && q->level>level; q = q->next) if (q->selected && q->is_widget() && !q->is_menu_item()) { @@ -667,6 +668,10 @@ void Fl_Window_Type::draw_overlay() { int x,y,r,t; newposition(myo,x,y,r,t); if (!show_guides || !drag || numselected != 1) fl_rect(x,y,r-x,t-y); + if (x < mysx) mysx = x; + if (y < mysy) mysy = y; + if (r > mysr) mysr = r; + if (t > myst) myst = t; if (!(myo->o->align() & FL_ALIGN_INSIDE)) { // Adjust left/right/top/bottom for top/bottom labels... int ww, hh; @@ -971,11 +976,16 @@ void Fl_Window_Type::draw_overlay() { } // Draw selection box + resize handles... + // draw box including all labels + fl_line_style(FL_DOT); fl_rect(mybx,myby,mybr-mybx,mybt-myby); - fl_rectf(mybx,myby,5,5); - fl_rectf(mybr-5,myby,5,5); - fl_rectf(mybr-5,mybt-5,5,5); - fl_rectf(mybx,mybt-5,5,5); + fl_line_style(FL_SOLID); + // draw box excluding labels + fl_rect(mysx,mysy,mysr-mysx,myst-mysy); + fl_rectf(mysx,mysy,5,5); + fl_rectf(mysr-5,mysy,5,5); + fl_rectf(mysr-5,myst-5,5,5); + fl_rectf(mysx,myst-5,5,5); } extern Fl_Menu_Item Main_Menu[]; |
