mirror of https://github.com/fltk/fltk
Add draw_children() method to Fl_Group.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2828 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
f841b45087
commit
ee58dd2f62
6
CHANGES
6
CHANGES
|
@ -1,5 +1,11 @@
|
|||
CHANGES IN FLTK 1.1.2
|
||||
|
||||
- Added a "draw_children()" method to Fl_Group to make
|
||||
subclassing Fl_Group with a custom draw() function
|
||||
easier.
|
||||
- Fl_Text_Editor now supports basic undo functionality.
|
||||
- FLUID now uses Fl_Text_Editor widgets for all
|
||||
multi-line code fields.
|
||||
- Added new widget bin and icons to FLUID.
|
||||
- FLUID would try running multiple commands in parallel,
|
||||
even though it wasn't capable of handling it.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// "$Id: Fl_Group.H,v 1.6.2.4.2.6 2002/08/14 16:19:48 easysw Exp $"
|
||||
// "$Id: Fl_Group.H,v 1.6.2.4.2.7 2002/11/08 15:22:08 easysw Exp $"
|
||||
//
|
||||
// Group header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
|
@ -45,8 +45,9 @@ protected:
|
|||
|
||||
void draw();
|
||||
void draw_child(Fl_Widget&) const;
|
||||
void update_child(Fl_Widget&) const;
|
||||
void draw_children();
|
||||
void draw_outside_label(const Fl_Widget&) const ;
|
||||
void update_child(Fl_Widget&) const;
|
||||
short* sizes();
|
||||
|
||||
public:
|
||||
|
@ -96,5 +97,5 @@ public:
|
|||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Group.H,v 1.6.2.4.2.6 2002/08/14 16:19:48 easysw Exp $".
|
||||
// End of "$Id: Fl_Group.H,v 1.6.2.4.2.7 2002/11/08 15:22:08 easysw Exp $".
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// "$Id: Fl_Group.cxx,v 1.8.2.8.2.18 2002/08/09 01:09:48 easysw Exp $"
|
||||
// "$Id: Fl_Group.cxx,v 1.8.2.8.2.19 2002/11/08 15:22:11 easysw Exp $"
|
||||
//
|
||||
// Group widget for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
|
@ -519,11 +519,9 @@ void Fl_Group::resize(int X, int Y, int W, int H) {
|
|||
Fl_Widget::resize(X,Y,W,H);
|
||||
}
|
||||
|
||||
void Fl_Group::draw() {
|
||||
void Fl_Group::draw_children() {
|
||||
Fl_Widget*const* a = array();
|
||||
if (damage() & ~FL_DAMAGE_CHILD) { // redraw the entire thing:
|
||||
draw_box();
|
||||
draw_label();
|
||||
for (int i=children_; i--;) {
|
||||
Fl_Widget& o = **a++;
|
||||
draw_child(o);
|
||||
|
@ -534,6 +532,15 @@ void Fl_Group::draw() {
|
|||
}
|
||||
}
|
||||
|
||||
void Fl_Group::draw() {
|
||||
Fl_Widget*const* a = array();
|
||||
if (damage() & ~FL_DAMAGE_CHILD) { // redraw the entire thing:
|
||||
draw_box();
|
||||
draw_label();
|
||||
}
|
||||
draw_children();
|
||||
}
|
||||
|
||||
// Draw a child only if it needs it:
|
||||
void Fl_Group::update_child(Fl_Widget& widget) const {
|
||||
if (widget.damage() && widget.visible() && widget.type() < FL_WINDOW &&
|
||||
|
@ -587,5 +594,5 @@ void Fl_Group::draw_outside_label(const Fl_Widget& widget) const {
|
|||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.18 2002/08/09 01:09:48 easysw Exp $".
|
||||
// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.19 2002/11/08 15:22:11 easysw Exp $".
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// "$Id: Fl_Text_Buffer.cxx,v 1.9.2.13 2002/11/05 19:53:50 matthiaswm Exp $"
|
||||
// "$Id: Fl_Text_Buffer.cxx,v 1.9.2.14 2002/11/08 15:22:15 easysw Exp $"
|
||||
//
|
||||
// Copyright 2001-2002 by Bill Spitzak and others.
|
||||
// Original code Copyright Mark Edel. Permission to distribute under
|
||||
|
@ -351,7 +351,6 @@ int Fl_Text_Buffer::undo(int *cursorPos) {
|
|||
undobuffersize(ilen+1);
|
||||
undobuffer[ilen] = 0;
|
||||
char *tmp = strdup(undobuffer);
|
||||
int at = undoat;
|
||||
replace(b, undoat, tmp);
|
||||
if (cursorPos) *cursorPos = mCursorPosHint;
|
||||
free(tmp);
|
||||
|
@ -2494,5 +2493,5 @@ Fl_Text_Buffer::outputfile(const char *file, int start, int end, int buflen) {
|
|||
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Text_Buffer.cxx,v 1.9.2.13 2002/11/05 19:53:50 matthiaswm Exp $".
|
||||
// End of "$Id: Fl_Text_Buffer.cxx,v 1.9.2.14 2002/11/08 15:22:15 easysw Exp $".
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue