diff options
| -rw-r--r-- | FL/Fl_Text_Display.H | 3 | ||||
| -rw-r--r-- | src/Fl_Text_Display.cxx | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/FL/Fl_Text_Display.H b/FL/Fl_Text_Display.H index 5df2a7411..9acae008b 100644 --- a/FL/Fl_Text_Display.H +++ b/FL/Fl_Text_Display.H @@ -50,7 +50,8 @@ public: CARET_CURSOR, /**< caret under the text */ DIM_CURSOR, /**< dim I-beam */ BLOCK_CURSOR, /**< unfille box under the current character */ - HEAVY_CURSOR /**< thick I-beam */ + HEAVY_CURSOR, /**< thick I-beam */ + SIMPLE_CURSOR /**< as cursor as Fl_Input cursor */ }; /** diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index fee914a3e..358da7571 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -2087,6 +2087,10 @@ void Fl_Text_Display::draw_cursor( int X, int Y ) { segs[ 2 ].x1 = right; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = X; segs[ 2 ].y2 = bot; segs[ 3 ].x1 = X; segs[ 3 ].y1 = bot; segs[ 3 ].x2 = X; segs[ 3 ].y2 = Y; nSegs = 4; + } else if ( mCursorStyle == SIMPLE_CURSOR ){ + segs[ 0 ].x1 = X; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = X; segs[ 0 ].y2 = bot; + segs[ 1 ].x1 = X+1; segs[ 1 ].y1 = Y; segs[ 1 ].x2 = X+1; segs[ 1 ].y2 = bot; + nSegs = 2; } fl_color( mCursor_color ); |
