FLTK 1.4.4: Fl_Input.H Source File

FLTK 1.4.4

Loading...
Searching...
No Matches
Fl_Input.H
1//
2// Input header file for the Fast Light Tool Kit (FLTK).
3//
4// Copyright 1998-2023 by Bill Spitzak and others.
5//
6// This library is free software. Distribution and use rights are outlined in
7// the file "COPYING" which should have been included with this file. If this
8// file is missing or damaged, see the license at:
9//
10// https://www.fltk.org/COPYING.php
11//
12// Please see the following page on how to report bugs and issues:
13//
14// https://www.fltk.org/bugs.php
15//
16
17/* \file
18 Fl_Input widget . */
19
20#ifndef Fl_Input_H
21#define Fl_Input_H
22
23#include "Fl_Input_.H"
24
220 class FL_EXPORT Fl_Input : public Fl_Input_ {
221 friend class Fl_Screen_Driver;
222 friend class Fl_Cocoa_Screen_Driver; // Not ideal, but probably no other platform will use it
223 int shift_position(int p);
224 int shift_up_down_position(int p);
225 void handle_mouse(int keepmark=0);
226
227 // Private keyboard functions
228 int kf_lines_up(int repeat_num);
229 int kf_lines_down(int repeat_num);
230 int kf_page_up();
231 int kf_page_down();
232 int kf_insert_toggle();
233 int kf_delete_word_right();
234 int kf_delete_word_left();
235 int kf_delete_sol();
236 int kf_delete_eol();
237 int kf_delete_char_right();
238 int kf_delete_char_left();
239 int kf_move_sol();
240 int kf_move_eol();
241 int kf_clear_eol();
242 int kf_move_char_left();
243 int kf_move_char_right();
244 int kf_move_word_left();
245 int kf_move_word_right();
246 int kf_move_up_and_sol();
247 int kf_move_down_and_eol();
248 int kf_top();
249 int kf_bottom();
250 int kf_select_all();
251 int kf_undo();
252 int kf_redo();
253 int kf_copy();
254 int kf_paste();
255 int kf_copy_cut();
256
257protected:
258 void draw() FL_OVERRIDE;
259 int handle_key();
260 int handle_rmb();
261
262public:
263 int handle(int) FL_OVERRIDE;
264 Fl_Input(int,int,int,int,const char * = 0);
265 static const char *cut_menu_text;
266 static const char *copy_menu_text;
267 static const char *paste_menu_text;
268};
269
270#endif
Fl_Input_::Fl_Input_
Fl_Input_(int, int, int, int, const char *=0)
Creates a new Fl_Input_ widget.
Definition Fl_Input_.cxx:1296
Fl_Input_::handle_mouse
void handle_mouse(int, int, int, int, int keepmark=0)
Handles mouse clicks and mouse moves.
Definition Fl_Input_.cxx:640
Fl_Input::cut_menu_text
static const char * cut_menu_text
[this text may be customized at run-time]
Definition Fl_Input.H:265
Fl_Input::Fl_Input
Fl_Input(int, int, int, int, const char *=0)
Creates a new Fl_Input widget using the given position, size, and label string.
Definition Fl_Input.cxx:786
Fl_Input::handle_rmb
int handle_rmb()
Handle right mouse button down events.
Definition Fl_Input.cxx:513
Fl_Input::paste_menu_text
static const char * paste_menu_text
[this text may be customized at run-time]
Definition Fl_Input.H:267
Fl_Input::handle_key
int handle_key()
Handles a keystroke.
Definition Fl_Input.cxx:344
Fl_Input::copy_menu_text
static const char * copy_menu_text
[this text may be customized at run-time]
Definition Fl_Input.H:266
Fl_Widget::draw
virtual void draw()=0
Draws the widget.
Fl_Widget::handle
virtual int handle(int event)
Handles the specified event.
Definition Fl_Widget.cxx:102
FL_OVERRIDE
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46