Fl_Text_Display/Editor would not receive FL_FOCUS events on mouse clicks

which resulted in not showing the insertion cursor.
Fluid would not register changes to Fl_Text_Editor widgets unless Enter
was pressed.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2885 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2002-12-26 01:15:32 +00:00
parent a81ea6a412
commit fcb49a7b13
7 changed files with 19 additions and 12 deletions

View File

@ -1,4 +1,4 @@
// generated by Fast Light User Interface Designer (fluid) version 1.0102
// generated by Fast Light User Interface Designer (fluid) version 1.0103
#include "function_panel.h"
#include <FL/Fl_Pixmap.H>
@ -82,6 +82,7 @@ Fl_Window* make_code_panel() {
Fl_Group::current()->resizable(o);
o->buffer(new Fl_Text_Buffer);
o->textfont(FL_COURIER);
o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);
}
o->end();
Fl_Group::current()->resizable(o);

View File

@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
version 1.0102
version 1.0103
header_name {.h}
code_name {.cxx}
decl {\#include <FL/Fl_Pixmap.H>} {}
@ -54,10 +54,11 @@ Function {make_code_panel()} {open
Fl_Group {} {open
xywh {10 10 525 120} box DOWN_FRAME resizable
} {
Fl_Text_Editor code_input {
Fl_Text_Editor code_input {selected
xywh {12 12 521 116} box NO_BOX resizable
code0 {o->buffer(new Fl_Text_Buffer);}
code1 {o->textfont(FL_COURIER);}
code2 {o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);}
}
}
Fl_Return_Button code_panel_ok {
@ -399,7 +400,7 @@ Function {make_widgetbin()} {open
}
Fl_Button {} {
user_data {"Fl_Output"}
callback type_make_cb selected
callback type_make_cb
tooltip Output xywh {284 4 24 24} box THIN_UP_BOX
code0 {o->image(pixmap[27]);}
}

View File

@ -1,4 +1,4 @@
// generated by Fast Light User Interface Designer (fluid) version 1.0102
// generated by Fast Light User Interface Designer (fluid) version 1.0103
#ifndef function_panel_h
#define function_panel_h

View File

@ -1,4 +1,4 @@
// generated by Fast Light User Interface Designer (fluid) version 1.0102
// generated by Fast Light User Interface Designer (fluid) version 1.0103
#include "widget_panel.h"
@ -452,6 +452,7 @@ Fl_Double_Window* make_widget_panel() {
Fl_Group::current()->resizable(o);
o->buffer(new Fl_Text_Buffer());
o->textfont(FL_COURIER);
o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);
}
o->end();
Fl_Group::current()->resizable(o);

View File

@ -1,11 +1,11 @@
# data file for the Fltk User Interface Designer (fluid)
version 1.0102
version 1.0103
header_name {.h}
code_name {.cxx}
Function {make_widget_panel()} {open
} {
Fl_Window {} {open
xywh {318 157 415 370} type Double resizable hotspot visible
xywh {366 151 415 370} type Double resizable hotspot visible
} {
Fl_Tabs {} {
callback {propagate_load((Fl_Group *)o,v);} open
@ -417,6 +417,7 @@ image}
tooltip {The callback function or code for the widget.} xywh {102 177 291 86} box NO_BOX align 4 textfont 4 resizable
code0 {o->buffer(new Fl_Text_Buffer());}
code1 {o->textfont(FL_COURIER);}
code2 {o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);}
}
}
Fl_Box {} {

View File

@ -1,4 +1,4 @@
// generated by Fast Light User Interface Designer (fluid) version 1.0102
// generated by Fast Light User Interface Designer (fluid) version 1.0103
#ifndef widget_panel_h
#define widget_panel_h

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Text_Display.cxx,v 1.12.2.39 2002/11/19 16:45:32 easysw Exp $"
// "$Id: Fl_Text_Display.cxx,v 1.12.2.40 2002/12/26 01:15:32 matthiaswm Exp $"
//
// Copyright 2001-2002 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
@ -2973,7 +2973,10 @@ int Fl_Text_Display::handle(int event) {
}
case FL_PUSH: {
Fl::focus(this); // Take focus from any child widgets...
if (Fl::focus() != this) {
Fl::focus(this);
handle(FL_FOCUS);
}
if (Fl::event_state()&FL_SHIFT) return handle(FL_DRAG);
dragging = 1;
int pos = xy_to_position(Fl::event_x(), Fl::event_y(), CURSOR_POS);
@ -3035,5 +3038,5 @@ int Fl_Text_Display::handle(int event) {
//
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.39 2002/11/19 16:45:32 easysw Exp $".
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.40 2002/12/26 01:15:32 matthiaswm Exp $".
//