diff options
| author | Manolo Gouy <Manolo> | 2016-03-31 17:25:18 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-03-31 17:25:18 +0000 |
| commit | 2de2f5496820f91c81df65834eee268126086209 (patch) | |
| tree | 1ee88071287b849a08467bee48f7c281b38d1bae /src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx | |
| parent | ff83e355b09f07848257d8fef7a12705347955cc (diff) | |
Move the marked text support member functions from Fl_System_Driver to Fl_Screen_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11486 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx')
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx index 2d2d6675b..0e8f480d1 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx +++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx @@ -230,6 +230,39 @@ const char *Fl_Cocoa_Screen_Driver::get_system_scheme() } +int Fl_Cocoa_Screen_Driver::has_marked_text() { + return true; +} + + +static int insertion_point_x = 0; +static int insertion_point_y = 0; +static int insertion_point_height = 0; +static bool insertion_point_location_is_valid = false; + +void Fl_Cocoa_Screen_Driver::reset_marked_text() { + Fl::compose_state = 0; + Fl_X::next_marked_length = 0; + insertion_point_location_is_valid = false; +} + +int Fl_X::insertion_point_location(int *px, int *py, int *pheight) +// return true if the current coordinates of the insertion point are available +{ + if ( ! insertion_point_location_is_valid ) return false; + *px = insertion_point_x; + *py = insertion_point_y; + *pheight = insertion_point_height; + return true; +} + +void Fl_Cocoa_Screen_Driver::insertion_point_location(int x, int y, int height) { + insertion_point_location_is_valid = true; + insertion_point_x = x; + insertion_point_y = y; + insertion_point_height = height; +} + // // End of "$Id$". |
