Merged revisions 7764-7977,7979-8058 via svnmerge from
svn://svn.netsurf-browser.org/branches/paulblokus/textinput
........
r7769 | paulblokus | 2009-06-11 22:26:16 +0100 (Thu, 11 Jun 2009) | 4 lines
replace global history window with an empty window for future tests
add the necessary files
first lines ported
........
r7771 | paulblokus | 2009-06-11 23:51:46 +0100 (Thu, 11 Jun 2009) | 1 line
more functions
........
r7772 | paulblokus | 2009-06-12 02:07:36 +0100 (Fri, 12 Jun 2009) | 1 line
redraw working
........
r7777 | paulblokus | 2009-06-12 11:35:45 +0100 (Fri, 12 Jun 2009) | 3 lines
plotter fix
make use of the provided clipping rectangle
........
r7781 | paulblokus | 2009-06-12 16:26:51 +0100 (Fri, 12 Jun 2009) | 3 lines
callbacks for taxtarea to request a [caret]redraw
basic caret handling drawing
........
r7782 | paulblokus | 2009-06-12 22:36:50 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7783 | paulblokus | 2009-06-12 22:41:37 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7784 | paulblokus | 2009-06-12 23:55:40 +0100 (Fri, 12 Jun 2009) | 3 lines
fixed caret clipping
arrows, delete and backspace
........
r7812 | paulblokus | 2009-06-16 14:55:41 +0100 (Tue, 16 Jun 2009) | 1 line
remove bug causing NS hang on \n in textarea
........
r7816 | paulblokus | 2009-06-16 16:29:48 +0100 (Tue, 16 Jun 2009) | 1 line
Enter, Home, End keys
........
r7817 | paulblokus | 2009-06-16 16:56:16 +0100 (Tue, 16 Jun 2009) | 1 line
Ctrl + Home/End
........
r7818 | paulblokus | 2009-06-16 17:16:51 +0100 (Tue, 16 Jun 2009) | 1 line
redraw caret only on caret moves
........
r7821 | paulblokus | 2009-06-16 20:18:30 +0100 (Tue, 16 Jun 2009) | 1 line
line end/start delete
........
r7822 | paulblokus | 2009-06-16 23:43:42 +0100 (Tue, 16 Jun 2009) | 1 line
selection drawing + select all
........
r7823 | paulblokus | 2009-06-17 02:31:07 +0100 (Wed, 17 Jun 2009) | 3 lines
auto scrolling on caret moves
clear selection
........
r7845 | paulblokus | 2009-06-18 17:35:03 +0100 (Thu, 18 Jun 2009) | 1 line
page up/down
........
r7846 | paulblokus | 2009-06-18 17:38:45 +0100 (Thu, 18 Jun 2009) | 1 line
remove unnecessary fix
........
r7847 | paulblokus | 2009-06-18 18:00:16 +0100 (Thu, 18 Jun 2009) | 1 line
clipping fixes
........
r7849 | paulblokus | 2009-06-18 18:21:02 +0100 (Thu, 18 Jun 2009) | 1 line
scroll fix
........
r7850 | paulblokus | 2009-06-18 18:45:13 +0100 (Thu, 18 Jun 2009) | 1 line
simplified redraw request logic
........
r7855 | paulblokus | 2009-06-18 19:56:24 +0100 (Thu, 18 Jun 2009) | 1 line
front end passing mouse events
........
r7858 | paulblokus | 2009-06-18 22:18:39 +0100 (Thu, 18 Jun 2009) | 3 lines
drag selection
bug fixes
........
r7860 | paulblokus | 2009-06-18 23:32:39 +0100 (Thu, 18 Jun 2009) | 3 lines
take selection into account on keypress of different types
a few bugs fixed
........
r7876 | paulblokus | 2009-06-19 13:43:07 +0100 (Fri, 19 Jun 2009) | 3 lines
pango nsfont_split fix
a few textarea fixes
........
r7879 | paulblokus | 2009-06-19 17:33:10 +0100 (Fri, 19 Jun 2009) | 4 lines
newline handling seems to work this way
clear selection on mouse click
more bug fixes
........
r7880 | paulblokus | 2009-06-19 18:16:27 +0100 (Fri, 19 Jun 2009) | 3 lines
no caret option
selection follows drag
........
r7883 | paulblokus | 2009-06-19 19:08:44 +0100 (Fri, 19 Jun 2009) | 3 lines
o width selection bug fix
caret at correct side of drag selection
........
r7918 | paulblokus | 2009-06-22 21:01:28 +0100 (Mon, 22 Jun 2009) | 3 lines
fix caret positioning at line end
CR removal in input methods
........
r7919 | paulblokus | 2009-06-22 21:34:39 +0100 (Mon, 22 Jun 2009) | 1 line
fix crash on 0 length text
........
r7926 | paulblokus | 2009-06-23 09:53:56 +0100 (Tue, 23 Jun 2009) | 3 lines
change LF into spaces for single line widget
text normalisation at one place
........
r7931 | paulblokus | 2009-06-23 10:51:25 +0100 (Tue, 23 Jun 2009) | 1 line
cleanup
........
r7933 | paulblokus | 2009-06-23 11:17:22 +0100 (Tue, 23 Jun 2009) | 1 line
fix selection draw
........
r7935 | paulblokus | 2009-06-23 11:41:30 +0100 (Tue, 23 Jun 2009) | 1 line
guard readonly
........
r7942 | paulblokus | 2009-06-24 08:19:39 +0100 (Wed, 24 Jun 2009) | 1 line
applied changes suggested by jmb
........
r7943 | paulblokus | 2009-06-24 09:04:49 +0100 (Wed, 24 Jun 2009) | 1 line
little fixes
........
r7945 | paulblokus | 2009-06-24 12:50:14 +0100 (Wed, 24 Jun 2009) | 1 line
correct line length and wrapping
........
r7947 | paulblokus | 2009-06-24 14:32:36 +0100 (Wed, 24 Jun 2009) | 3 lines
fixed page up/down broken in last commit
changed logic for caret positioning on soft breaks
........
r7949 | paulblokus | 2009-06-24 16:31:42 +0100 (Wed, 24 Jun 2009) | 1 line
remove temporary/test code
........
r7975 | paulblokus | 2009-06-25 16:00:46 +0100 (Thu, 25 Jun 2009) | 1 line
changes suggested by jmb
........
r7976 | paulblokus | 2009-06-25 16:33:23 +0100 (Thu, 25 Jun 2009) | 1 line
added ro_ prefix to RISC OS textarea code
........
svn path=/trunk/netsurf/; revision=8060
2009-06-27 17:59:25 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2006 John-Mark Bell <jmb@netsurf-browser.org>
|
|
|
|
* Copyright 2009 Paul Blokus <paul_pl@users.sourceforge.net>
|
|
|
|
*
|
|
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
|
|
*
|
|
|
|
* NetSurf is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* NetSurf is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** \file
|
|
|
|
* Single/Multi-line UTF-8 text area (interface)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NETSURF_DESKTOP_TEXTAREA_H_
|
|
|
|
#define _NETSURF_DESKTOP_TEXTAREA_H_
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "desktop/browser.h"
|
2009-07-24 03:05:34 +04:00
|
|
|
#include "desktop/plot_style.h"
|
Merged revisions 7764-7977,7979-8058 via svnmerge from
svn://svn.netsurf-browser.org/branches/paulblokus/textinput
........
r7769 | paulblokus | 2009-06-11 22:26:16 +0100 (Thu, 11 Jun 2009) | 4 lines
replace global history window with an empty window for future tests
add the necessary files
first lines ported
........
r7771 | paulblokus | 2009-06-11 23:51:46 +0100 (Thu, 11 Jun 2009) | 1 line
more functions
........
r7772 | paulblokus | 2009-06-12 02:07:36 +0100 (Fri, 12 Jun 2009) | 1 line
redraw working
........
r7777 | paulblokus | 2009-06-12 11:35:45 +0100 (Fri, 12 Jun 2009) | 3 lines
plotter fix
make use of the provided clipping rectangle
........
r7781 | paulblokus | 2009-06-12 16:26:51 +0100 (Fri, 12 Jun 2009) | 3 lines
callbacks for taxtarea to request a [caret]redraw
basic caret handling drawing
........
r7782 | paulblokus | 2009-06-12 22:36:50 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7783 | paulblokus | 2009-06-12 22:41:37 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7784 | paulblokus | 2009-06-12 23:55:40 +0100 (Fri, 12 Jun 2009) | 3 lines
fixed caret clipping
arrows, delete and backspace
........
r7812 | paulblokus | 2009-06-16 14:55:41 +0100 (Tue, 16 Jun 2009) | 1 line
remove bug causing NS hang on \n in textarea
........
r7816 | paulblokus | 2009-06-16 16:29:48 +0100 (Tue, 16 Jun 2009) | 1 line
Enter, Home, End keys
........
r7817 | paulblokus | 2009-06-16 16:56:16 +0100 (Tue, 16 Jun 2009) | 1 line
Ctrl + Home/End
........
r7818 | paulblokus | 2009-06-16 17:16:51 +0100 (Tue, 16 Jun 2009) | 1 line
redraw caret only on caret moves
........
r7821 | paulblokus | 2009-06-16 20:18:30 +0100 (Tue, 16 Jun 2009) | 1 line
line end/start delete
........
r7822 | paulblokus | 2009-06-16 23:43:42 +0100 (Tue, 16 Jun 2009) | 1 line
selection drawing + select all
........
r7823 | paulblokus | 2009-06-17 02:31:07 +0100 (Wed, 17 Jun 2009) | 3 lines
auto scrolling on caret moves
clear selection
........
r7845 | paulblokus | 2009-06-18 17:35:03 +0100 (Thu, 18 Jun 2009) | 1 line
page up/down
........
r7846 | paulblokus | 2009-06-18 17:38:45 +0100 (Thu, 18 Jun 2009) | 1 line
remove unnecessary fix
........
r7847 | paulblokus | 2009-06-18 18:00:16 +0100 (Thu, 18 Jun 2009) | 1 line
clipping fixes
........
r7849 | paulblokus | 2009-06-18 18:21:02 +0100 (Thu, 18 Jun 2009) | 1 line
scroll fix
........
r7850 | paulblokus | 2009-06-18 18:45:13 +0100 (Thu, 18 Jun 2009) | 1 line
simplified redraw request logic
........
r7855 | paulblokus | 2009-06-18 19:56:24 +0100 (Thu, 18 Jun 2009) | 1 line
front end passing mouse events
........
r7858 | paulblokus | 2009-06-18 22:18:39 +0100 (Thu, 18 Jun 2009) | 3 lines
drag selection
bug fixes
........
r7860 | paulblokus | 2009-06-18 23:32:39 +0100 (Thu, 18 Jun 2009) | 3 lines
take selection into account on keypress of different types
a few bugs fixed
........
r7876 | paulblokus | 2009-06-19 13:43:07 +0100 (Fri, 19 Jun 2009) | 3 lines
pango nsfont_split fix
a few textarea fixes
........
r7879 | paulblokus | 2009-06-19 17:33:10 +0100 (Fri, 19 Jun 2009) | 4 lines
newline handling seems to work this way
clear selection on mouse click
more bug fixes
........
r7880 | paulblokus | 2009-06-19 18:16:27 +0100 (Fri, 19 Jun 2009) | 3 lines
no caret option
selection follows drag
........
r7883 | paulblokus | 2009-06-19 19:08:44 +0100 (Fri, 19 Jun 2009) | 3 lines
o width selection bug fix
caret at correct side of drag selection
........
r7918 | paulblokus | 2009-06-22 21:01:28 +0100 (Mon, 22 Jun 2009) | 3 lines
fix caret positioning at line end
CR removal in input methods
........
r7919 | paulblokus | 2009-06-22 21:34:39 +0100 (Mon, 22 Jun 2009) | 1 line
fix crash on 0 length text
........
r7926 | paulblokus | 2009-06-23 09:53:56 +0100 (Tue, 23 Jun 2009) | 3 lines
change LF into spaces for single line widget
text normalisation at one place
........
r7931 | paulblokus | 2009-06-23 10:51:25 +0100 (Tue, 23 Jun 2009) | 1 line
cleanup
........
r7933 | paulblokus | 2009-06-23 11:17:22 +0100 (Tue, 23 Jun 2009) | 1 line
fix selection draw
........
r7935 | paulblokus | 2009-06-23 11:41:30 +0100 (Tue, 23 Jun 2009) | 1 line
guard readonly
........
r7942 | paulblokus | 2009-06-24 08:19:39 +0100 (Wed, 24 Jun 2009) | 1 line
applied changes suggested by jmb
........
r7943 | paulblokus | 2009-06-24 09:04:49 +0100 (Wed, 24 Jun 2009) | 1 line
little fixes
........
r7945 | paulblokus | 2009-06-24 12:50:14 +0100 (Wed, 24 Jun 2009) | 1 line
correct line length and wrapping
........
r7947 | paulblokus | 2009-06-24 14:32:36 +0100 (Wed, 24 Jun 2009) | 3 lines
fixed page up/down broken in last commit
changed logic for caret positioning on soft breaks
........
r7949 | paulblokus | 2009-06-24 16:31:42 +0100 (Wed, 24 Jun 2009) | 1 line
remove temporary/test code
........
r7975 | paulblokus | 2009-06-25 16:00:46 +0100 (Thu, 25 Jun 2009) | 1 line
changes suggested by jmb
........
r7976 | paulblokus | 2009-06-25 16:33:23 +0100 (Thu, 25 Jun 2009) | 1 line
added ro_ prefix to RISC OS textarea code
........
svn path=/trunk/netsurf/; revision=8060
2009-06-27 17:59:25 +04:00
|
|
|
|
2013-01-29 21:34:08 +04:00
|
|
|
|
|
|
|
struct textarea;
|
|
|
|
|
Merged revisions 7764-7977,7979-8058 via svnmerge from
svn://svn.netsurf-browser.org/branches/paulblokus/textinput
........
r7769 | paulblokus | 2009-06-11 22:26:16 +0100 (Thu, 11 Jun 2009) | 4 lines
replace global history window with an empty window for future tests
add the necessary files
first lines ported
........
r7771 | paulblokus | 2009-06-11 23:51:46 +0100 (Thu, 11 Jun 2009) | 1 line
more functions
........
r7772 | paulblokus | 2009-06-12 02:07:36 +0100 (Fri, 12 Jun 2009) | 1 line
redraw working
........
r7777 | paulblokus | 2009-06-12 11:35:45 +0100 (Fri, 12 Jun 2009) | 3 lines
plotter fix
make use of the provided clipping rectangle
........
r7781 | paulblokus | 2009-06-12 16:26:51 +0100 (Fri, 12 Jun 2009) | 3 lines
callbacks for taxtarea to request a [caret]redraw
basic caret handling drawing
........
r7782 | paulblokus | 2009-06-12 22:36:50 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7783 | paulblokus | 2009-06-12 22:41:37 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7784 | paulblokus | 2009-06-12 23:55:40 +0100 (Fri, 12 Jun 2009) | 3 lines
fixed caret clipping
arrows, delete and backspace
........
r7812 | paulblokus | 2009-06-16 14:55:41 +0100 (Tue, 16 Jun 2009) | 1 line
remove bug causing NS hang on \n in textarea
........
r7816 | paulblokus | 2009-06-16 16:29:48 +0100 (Tue, 16 Jun 2009) | 1 line
Enter, Home, End keys
........
r7817 | paulblokus | 2009-06-16 16:56:16 +0100 (Tue, 16 Jun 2009) | 1 line
Ctrl + Home/End
........
r7818 | paulblokus | 2009-06-16 17:16:51 +0100 (Tue, 16 Jun 2009) | 1 line
redraw caret only on caret moves
........
r7821 | paulblokus | 2009-06-16 20:18:30 +0100 (Tue, 16 Jun 2009) | 1 line
line end/start delete
........
r7822 | paulblokus | 2009-06-16 23:43:42 +0100 (Tue, 16 Jun 2009) | 1 line
selection drawing + select all
........
r7823 | paulblokus | 2009-06-17 02:31:07 +0100 (Wed, 17 Jun 2009) | 3 lines
auto scrolling on caret moves
clear selection
........
r7845 | paulblokus | 2009-06-18 17:35:03 +0100 (Thu, 18 Jun 2009) | 1 line
page up/down
........
r7846 | paulblokus | 2009-06-18 17:38:45 +0100 (Thu, 18 Jun 2009) | 1 line
remove unnecessary fix
........
r7847 | paulblokus | 2009-06-18 18:00:16 +0100 (Thu, 18 Jun 2009) | 1 line
clipping fixes
........
r7849 | paulblokus | 2009-06-18 18:21:02 +0100 (Thu, 18 Jun 2009) | 1 line
scroll fix
........
r7850 | paulblokus | 2009-06-18 18:45:13 +0100 (Thu, 18 Jun 2009) | 1 line
simplified redraw request logic
........
r7855 | paulblokus | 2009-06-18 19:56:24 +0100 (Thu, 18 Jun 2009) | 1 line
front end passing mouse events
........
r7858 | paulblokus | 2009-06-18 22:18:39 +0100 (Thu, 18 Jun 2009) | 3 lines
drag selection
bug fixes
........
r7860 | paulblokus | 2009-06-18 23:32:39 +0100 (Thu, 18 Jun 2009) | 3 lines
take selection into account on keypress of different types
a few bugs fixed
........
r7876 | paulblokus | 2009-06-19 13:43:07 +0100 (Fri, 19 Jun 2009) | 3 lines
pango nsfont_split fix
a few textarea fixes
........
r7879 | paulblokus | 2009-06-19 17:33:10 +0100 (Fri, 19 Jun 2009) | 4 lines
newline handling seems to work this way
clear selection on mouse click
more bug fixes
........
r7880 | paulblokus | 2009-06-19 18:16:27 +0100 (Fri, 19 Jun 2009) | 3 lines
no caret option
selection follows drag
........
r7883 | paulblokus | 2009-06-19 19:08:44 +0100 (Fri, 19 Jun 2009) | 3 lines
o width selection bug fix
caret at correct side of drag selection
........
r7918 | paulblokus | 2009-06-22 21:01:28 +0100 (Mon, 22 Jun 2009) | 3 lines
fix caret positioning at line end
CR removal in input methods
........
r7919 | paulblokus | 2009-06-22 21:34:39 +0100 (Mon, 22 Jun 2009) | 1 line
fix crash on 0 length text
........
r7926 | paulblokus | 2009-06-23 09:53:56 +0100 (Tue, 23 Jun 2009) | 3 lines
change LF into spaces for single line widget
text normalisation at one place
........
r7931 | paulblokus | 2009-06-23 10:51:25 +0100 (Tue, 23 Jun 2009) | 1 line
cleanup
........
r7933 | paulblokus | 2009-06-23 11:17:22 +0100 (Tue, 23 Jun 2009) | 1 line
fix selection draw
........
r7935 | paulblokus | 2009-06-23 11:41:30 +0100 (Tue, 23 Jun 2009) | 1 line
guard readonly
........
r7942 | paulblokus | 2009-06-24 08:19:39 +0100 (Wed, 24 Jun 2009) | 1 line
applied changes suggested by jmb
........
r7943 | paulblokus | 2009-06-24 09:04:49 +0100 (Wed, 24 Jun 2009) | 1 line
little fixes
........
r7945 | paulblokus | 2009-06-24 12:50:14 +0100 (Wed, 24 Jun 2009) | 1 line
correct line length and wrapping
........
r7947 | paulblokus | 2009-06-24 14:32:36 +0100 (Wed, 24 Jun 2009) | 3 lines
fixed page up/down broken in last commit
changed logic for caret positioning on soft breaks
........
r7949 | paulblokus | 2009-06-24 16:31:42 +0100 (Wed, 24 Jun 2009) | 1 line
remove temporary/test code
........
r7975 | paulblokus | 2009-06-25 16:00:46 +0100 (Thu, 25 Jun 2009) | 1 line
changes suggested by jmb
........
r7976 | paulblokus | 2009-06-25 16:33:23 +0100 (Thu, 25 Jun 2009) | 1 line
added ro_ prefix to RISC OS textarea code
........
svn path=/trunk/netsurf/; revision=8060
2009-06-27 17:59:25 +04:00
|
|
|
/* Text area flags */
|
2013-01-29 21:34:08 +04:00
|
|
|
typedef enum {
|
2013-01-30 22:01:01 +04:00
|
|
|
TEXTAREA_DEFAULT = (1 << 0), /**< Standard input */
|
|
|
|
TEXTAREA_MULTILINE = (1 << 1), /**< Multiline area */
|
|
|
|
TEXTAREA_READONLY = (1 << 2), /**< Non-editable */
|
2013-02-01 22:29:27 +04:00
|
|
|
TEXTAREA_INTERNAL_CARET = (1 << 3), /**< Render own caret */
|
|
|
|
TEXTAREA_PASSWORD = (1 << 4) /**< Obscured display */
|
2013-01-05 18:52:02 +04:00
|
|
|
} textarea_flags;
|
Merged revisions 7764-7977,7979-8058 via svnmerge from
svn://svn.netsurf-browser.org/branches/paulblokus/textinput
........
r7769 | paulblokus | 2009-06-11 22:26:16 +0100 (Thu, 11 Jun 2009) | 4 lines
replace global history window with an empty window for future tests
add the necessary files
first lines ported
........
r7771 | paulblokus | 2009-06-11 23:51:46 +0100 (Thu, 11 Jun 2009) | 1 line
more functions
........
r7772 | paulblokus | 2009-06-12 02:07:36 +0100 (Fri, 12 Jun 2009) | 1 line
redraw working
........
r7777 | paulblokus | 2009-06-12 11:35:45 +0100 (Fri, 12 Jun 2009) | 3 lines
plotter fix
make use of the provided clipping rectangle
........
r7781 | paulblokus | 2009-06-12 16:26:51 +0100 (Fri, 12 Jun 2009) | 3 lines
callbacks for taxtarea to request a [caret]redraw
basic caret handling drawing
........
r7782 | paulblokus | 2009-06-12 22:36:50 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7783 | paulblokus | 2009-06-12 22:41:37 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7784 | paulblokus | 2009-06-12 23:55:40 +0100 (Fri, 12 Jun 2009) | 3 lines
fixed caret clipping
arrows, delete and backspace
........
r7812 | paulblokus | 2009-06-16 14:55:41 +0100 (Tue, 16 Jun 2009) | 1 line
remove bug causing NS hang on \n in textarea
........
r7816 | paulblokus | 2009-06-16 16:29:48 +0100 (Tue, 16 Jun 2009) | 1 line
Enter, Home, End keys
........
r7817 | paulblokus | 2009-06-16 16:56:16 +0100 (Tue, 16 Jun 2009) | 1 line
Ctrl + Home/End
........
r7818 | paulblokus | 2009-06-16 17:16:51 +0100 (Tue, 16 Jun 2009) | 1 line
redraw caret only on caret moves
........
r7821 | paulblokus | 2009-06-16 20:18:30 +0100 (Tue, 16 Jun 2009) | 1 line
line end/start delete
........
r7822 | paulblokus | 2009-06-16 23:43:42 +0100 (Tue, 16 Jun 2009) | 1 line
selection drawing + select all
........
r7823 | paulblokus | 2009-06-17 02:31:07 +0100 (Wed, 17 Jun 2009) | 3 lines
auto scrolling on caret moves
clear selection
........
r7845 | paulblokus | 2009-06-18 17:35:03 +0100 (Thu, 18 Jun 2009) | 1 line
page up/down
........
r7846 | paulblokus | 2009-06-18 17:38:45 +0100 (Thu, 18 Jun 2009) | 1 line
remove unnecessary fix
........
r7847 | paulblokus | 2009-06-18 18:00:16 +0100 (Thu, 18 Jun 2009) | 1 line
clipping fixes
........
r7849 | paulblokus | 2009-06-18 18:21:02 +0100 (Thu, 18 Jun 2009) | 1 line
scroll fix
........
r7850 | paulblokus | 2009-06-18 18:45:13 +0100 (Thu, 18 Jun 2009) | 1 line
simplified redraw request logic
........
r7855 | paulblokus | 2009-06-18 19:56:24 +0100 (Thu, 18 Jun 2009) | 1 line
front end passing mouse events
........
r7858 | paulblokus | 2009-06-18 22:18:39 +0100 (Thu, 18 Jun 2009) | 3 lines
drag selection
bug fixes
........
r7860 | paulblokus | 2009-06-18 23:32:39 +0100 (Thu, 18 Jun 2009) | 3 lines
take selection into account on keypress of different types
a few bugs fixed
........
r7876 | paulblokus | 2009-06-19 13:43:07 +0100 (Fri, 19 Jun 2009) | 3 lines
pango nsfont_split fix
a few textarea fixes
........
r7879 | paulblokus | 2009-06-19 17:33:10 +0100 (Fri, 19 Jun 2009) | 4 lines
newline handling seems to work this way
clear selection on mouse click
more bug fixes
........
r7880 | paulblokus | 2009-06-19 18:16:27 +0100 (Fri, 19 Jun 2009) | 3 lines
no caret option
selection follows drag
........
r7883 | paulblokus | 2009-06-19 19:08:44 +0100 (Fri, 19 Jun 2009) | 3 lines
o width selection bug fix
caret at correct side of drag selection
........
r7918 | paulblokus | 2009-06-22 21:01:28 +0100 (Mon, 22 Jun 2009) | 3 lines
fix caret positioning at line end
CR removal in input methods
........
r7919 | paulblokus | 2009-06-22 21:34:39 +0100 (Mon, 22 Jun 2009) | 1 line
fix crash on 0 length text
........
r7926 | paulblokus | 2009-06-23 09:53:56 +0100 (Tue, 23 Jun 2009) | 3 lines
change LF into spaces for single line widget
text normalisation at one place
........
r7931 | paulblokus | 2009-06-23 10:51:25 +0100 (Tue, 23 Jun 2009) | 1 line
cleanup
........
r7933 | paulblokus | 2009-06-23 11:17:22 +0100 (Tue, 23 Jun 2009) | 1 line
fix selection draw
........
r7935 | paulblokus | 2009-06-23 11:41:30 +0100 (Tue, 23 Jun 2009) | 1 line
guard readonly
........
r7942 | paulblokus | 2009-06-24 08:19:39 +0100 (Wed, 24 Jun 2009) | 1 line
applied changes suggested by jmb
........
r7943 | paulblokus | 2009-06-24 09:04:49 +0100 (Wed, 24 Jun 2009) | 1 line
little fixes
........
r7945 | paulblokus | 2009-06-24 12:50:14 +0100 (Wed, 24 Jun 2009) | 1 line
correct line length and wrapping
........
r7947 | paulblokus | 2009-06-24 14:32:36 +0100 (Wed, 24 Jun 2009) | 3 lines
fixed page up/down broken in last commit
changed logic for caret positioning on soft breaks
........
r7949 | paulblokus | 2009-06-24 16:31:42 +0100 (Wed, 24 Jun 2009) | 1 line
remove temporary/test code
........
r7975 | paulblokus | 2009-06-25 16:00:46 +0100 (Thu, 25 Jun 2009) | 1 line
changes suggested by jmb
........
r7976 | paulblokus | 2009-06-25 16:33:23 +0100 (Thu, 25 Jun 2009) | 1 line
added ro_ prefix to RISC OS textarea code
........
svn path=/trunk/netsurf/; revision=8060
2009-06-27 17:59:25 +04:00
|
|
|
|
2013-01-29 21:34:08 +04:00
|
|
|
typedef enum {
|
|
|
|
TEXTAREA_DRAG_NONE,
|
|
|
|
TEXTAREA_DRAG_SCROLLBAR,
|
|
|
|
TEXTAREA_DRAG_SELECTION
|
|
|
|
} textarea_drag_type;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
TEXTAREA_MSG_DRAG_REPORT, /**< Textarea drag start/end report */
|
2013-01-30 22:01:01 +04:00
|
|
|
TEXTAREA_MSG_REDRAW_REQUEST, /**< Textarea redraw request */
|
|
|
|
TEXTAREA_MSG_MOVED_CARET /**< Textarea caret moved */
|
2013-01-29 21:34:08 +04:00
|
|
|
} textarea_msg_type;
|
|
|
|
|
|
|
|
struct textarea_msg {
|
|
|
|
struct textarea *ta;
|
|
|
|
|
|
|
|
textarea_msg_type type;
|
|
|
|
union {
|
|
|
|
textarea_drag_type drag;
|
|
|
|
struct rect redraw;
|
2013-01-30 22:01:01 +04:00
|
|
|
struct {
|
|
|
|
bool hidden;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int height;
|
|
|
|
} caret;
|
2013-01-29 21:34:08 +04:00
|
|
|
} data;
|
|
|
|
};
|
|
|
|
|
2013-01-13 00:46:01 +04:00
|
|
|
typedef struct textarea_setup {
|
2013-01-13 00:59:32 +04:00
|
|
|
int width; /**< Textarea width */
|
|
|
|
int height; /**< Textarea height */
|
2013-01-13 00:46:01 +04:00
|
|
|
|
2013-01-13 00:59:32 +04:00
|
|
|
int pad_top; /**< Textarea top padding */
|
|
|
|
int pad_right; /**< Textarea right padding */
|
|
|
|
int pad_bottom; /**< Textarea bottom padding */
|
|
|
|
int pad_left; /**< Textarea left padding */
|
2013-01-13 00:46:01 +04:00
|
|
|
|
2013-01-13 00:59:32 +04:00
|
|
|
int border_width; /**< Textarea border width */
|
|
|
|
colour border_col; /**< Textarea border colour */
|
2013-01-13 00:46:01 +04:00
|
|
|
|
2013-01-13 00:59:32 +04:00
|
|
|
colour selected_text; /**< Textarea selected text colour */
|
|
|
|
colour selected_bg; /**< Textarea selection background colour */
|
2013-01-14 03:01:29 +04:00
|
|
|
plot_font_style_t text; /**< Textarea background colour and font */
|
2013-01-13 00:46:01 +04:00
|
|
|
|
|
|
|
} textarea_setup;
|
|
|
|
|
2013-01-29 21:34:08 +04:00
|
|
|
/**
|
|
|
|
* Client callback for the textarea
|
|
|
|
*
|
|
|
|
* \param data user data passed at textarea creation
|
|
|
|
* \param textarea_msg textarea message data
|
|
|
|
*/
|
|
|
|
typedef void(*textarea_client_callback)(void *data, struct textarea_msg *msg);
|
Merged revisions 7764-7977,7979-8058 via svnmerge from
svn://svn.netsurf-browser.org/branches/paulblokus/textinput
........
r7769 | paulblokus | 2009-06-11 22:26:16 +0100 (Thu, 11 Jun 2009) | 4 lines
replace global history window with an empty window for future tests
add the necessary files
first lines ported
........
r7771 | paulblokus | 2009-06-11 23:51:46 +0100 (Thu, 11 Jun 2009) | 1 line
more functions
........
r7772 | paulblokus | 2009-06-12 02:07:36 +0100 (Fri, 12 Jun 2009) | 1 line
redraw working
........
r7777 | paulblokus | 2009-06-12 11:35:45 +0100 (Fri, 12 Jun 2009) | 3 lines
plotter fix
make use of the provided clipping rectangle
........
r7781 | paulblokus | 2009-06-12 16:26:51 +0100 (Fri, 12 Jun 2009) | 3 lines
callbacks for taxtarea to request a [caret]redraw
basic caret handling drawing
........
r7782 | paulblokus | 2009-06-12 22:36:50 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7783 | paulblokus | 2009-06-12 22:41:37 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7784 | paulblokus | 2009-06-12 23:55:40 +0100 (Fri, 12 Jun 2009) | 3 lines
fixed caret clipping
arrows, delete and backspace
........
r7812 | paulblokus | 2009-06-16 14:55:41 +0100 (Tue, 16 Jun 2009) | 1 line
remove bug causing NS hang on \n in textarea
........
r7816 | paulblokus | 2009-06-16 16:29:48 +0100 (Tue, 16 Jun 2009) | 1 line
Enter, Home, End keys
........
r7817 | paulblokus | 2009-06-16 16:56:16 +0100 (Tue, 16 Jun 2009) | 1 line
Ctrl + Home/End
........
r7818 | paulblokus | 2009-06-16 17:16:51 +0100 (Tue, 16 Jun 2009) | 1 line
redraw caret only on caret moves
........
r7821 | paulblokus | 2009-06-16 20:18:30 +0100 (Tue, 16 Jun 2009) | 1 line
line end/start delete
........
r7822 | paulblokus | 2009-06-16 23:43:42 +0100 (Tue, 16 Jun 2009) | 1 line
selection drawing + select all
........
r7823 | paulblokus | 2009-06-17 02:31:07 +0100 (Wed, 17 Jun 2009) | 3 lines
auto scrolling on caret moves
clear selection
........
r7845 | paulblokus | 2009-06-18 17:35:03 +0100 (Thu, 18 Jun 2009) | 1 line
page up/down
........
r7846 | paulblokus | 2009-06-18 17:38:45 +0100 (Thu, 18 Jun 2009) | 1 line
remove unnecessary fix
........
r7847 | paulblokus | 2009-06-18 18:00:16 +0100 (Thu, 18 Jun 2009) | 1 line
clipping fixes
........
r7849 | paulblokus | 2009-06-18 18:21:02 +0100 (Thu, 18 Jun 2009) | 1 line
scroll fix
........
r7850 | paulblokus | 2009-06-18 18:45:13 +0100 (Thu, 18 Jun 2009) | 1 line
simplified redraw request logic
........
r7855 | paulblokus | 2009-06-18 19:56:24 +0100 (Thu, 18 Jun 2009) | 1 line
front end passing mouse events
........
r7858 | paulblokus | 2009-06-18 22:18:39 +0100 (Thu, 18 Jun 2009) | 3 lines
drag selection
bug fixes
........
r7860 | paulblokus | 2009-06-18 23:32:39 +0100 (Thu, 18 Jun 2009) | 3 lines
take selection into account on keypress of different types
a few bugs fixed
........
r7876 | paulblokus | 2009-06-19 13:43:07 +0100 (Fri, 19 Jun 2009) | 3 lines
pango nsfont_split fix
a few textarea fixes
........
r7879 | paulblokus | 2009-06-19 17:33:10 +0100 (Fri, 19 Jun 2009) | 4 lines
newline handling seems to work this way
clear selection on mouse click
more bug fixes
........
r7880 | paulblokus | 2009-06-19 18:16:27 +0100 (Fri, 19 Jun 2009) | 3 lines
no caret option
selection follows drag
........
r7883 | paulblokus | 2009-06-19 19:08:44 +0100 (Fri, 19 Jun 2009) | 3 lines
o width selection bug fix
caret at correct side of drag selection
........
r7918 | paulblokus | 2009-06-22 21:01:28 +0100 (Mon, 22 Jun 2009) | 3 lines
fix caret positioning at line end
CR removal in input methods
........
r7919 | paulblokus | 2009-06-22 21:34:39 +0100 (Mon, 22 Jun 2009) | 1 line
fix crash on 0 length text
........
r7926 | paulblokus | 2009-06-23 09:53:56 +0100 (Tue, 23 Jun 2009) | 3 lines
change LF into spaces for single line widget
text normalisation at one place
........
r7931 | paulblokus | 2009-06-23 10:51:25 +0100 (Tue, 23 Jun 2009) | 1 line
cleanup
........
r7933 | paulblokus | 2009-06-23 11:17:22 +0100 (Tue, 23 Jun 2009) | 1 line
fix selection draw
........
r7935 | paulblokus | 2009-06-23 11:41:30 +0100 (Tue, 23 Jun 2009) | 1 line
guard readonly
........
r7942 | paulblokus | 2009-06-24 08:19:39 +0100 (Wed, 24 Jun 2009) | 1 line
applied changes suggested by jmb
........
r7943 | paulblokus | 2009-06-24 09:04:49 +0100 (Wed, 24 Jun 2009) | 1 line
little fixes
........
r7945 | paulblokus | 2009-06-24 12:50:14 +0100 (Wed, 24 Jun 2009) | 1 line
correct line length and wrapping
........
r7947 | paulblokus | 2009-06-24 14:32:36 +0100 (Wed, 24 Jun 2009) | 3 lines
fixed page up/down broken in last commit
changed logic for caret positioning on soft breaks
........
r7949 | paulblokus | 2009-06-24 16:31:42 +0100 (Wed, 24 Jun 2009) | 1 line
remove temporary/test code
........
r7975 | paulblokus | 2009-06-25 16:00:46 +0100 (Thu, 25 Jun 2009) | 1 line
changes suggested by jmb
........
r7976 | paulblokus | 2009-06-25 16:33:23 +0100 (Thu, 25 Jun 2009) | 1 line
added ro_ prefix to RISC OS textarea code
........
svn path=/trunk/netsurf/; revision=8060
2009-06-27 17:59:25 +04:00
|
|
|
|
2013-01-05 19:15:23 +04:00
|
|
|
/**
|
|
|
|
* Create a text area
|
|
|
|
*
|
2013-01-13 00:59:32 +04:00
|
|
|
* \param setup textarea settings and style
|
|
|
|
* \param redraw_callback will be called when textarea wants to redraw
|
|
|
|
* \param data user specified data which will be passed to callbacks
|
2013-01-05 19:15:23 +04:00
|
|
|
* \return Opaque handle for textarea or 0 on error
|
|
|
|
*/
|
2013-02-03 02:58:35 +04:00
|
|
|
struct textarea *textarea_create(const textarea_flags flags,
|
|
|
|
const textarea_setup *setup,
|
2013-01-29 21:34:08 +04:00
|
|
|
textarea_client_callback callback, void *data);
|
2013-01-05 19:15:23 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Destroy a text area
|
|
|
|
*
|
|
|
|
* \param ta Text area to destroy
|
|
|
|
*/
|
2013-01-05 18:52:02 +04:00
|
|
|
void textarea_destroy(struct textarea *ta);
|
2013-01-05 19:15:23 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the text in a text area, discarding any current text
|
|
|
|
*
|
|
|
|
* \param ta Text area
|
|
|
|
* \param text UTF-8 text to set text area's contents to
|
|
|
|
* \return true on success, false on memory exhaustion
|
|
|
|
*/
|
2013-01-05 18:52:02 +04:00
|
|
|
bool textarea_set_text(struct textarea *ta, const char *text);
|
2013-01-05 19:15:23 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Extract the text from a text area
|
|
|
|
*
|
|
|
|
* \param ta Text area
|
|
|
|
* \param buf Pointer to buffer to receive data, or NULL
|
|
|
|
* to read length required
|
|
|
|
* \param len Length (bytes) of buffer pointed to by buf, or 0 to read length
|
|
|
|
* \return Length (bytes) written/required or -1 on error
|
|
|
|
*/
|
2013-01-05 18:52:02 +04:00
|
|
|
int textarea_get_text(struct textarea *ta, char *buf, unsigned int len);
|
2013-01-05 19:15:23 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the caret's position
|
|
|
|
*
|
|
|
|
* \param ta Text area
|
|
|
|
* \param caret 0-based character index to place caret at, -1 removes
|
|
|
|
* the caret
|
|
|
|
* \return true on success false otherwise
|
|
|
|
*/
|
2013-01-05 18:52:02 +04:00
|
|
|
bool textarea_set_caret(struct textarea *ta, int caret);
|
2013-01-05 19:15:23 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the caret's position
|
|
|
|
*
|
|
|
|
* \param ta Text area
|
|
|
|
* \return 0-based character index of caret location, or -1 on error
|
|
|
|
*/
|
2013-01-05 18:52:02 +04:00
|
|
|
int textarea_get_caret(struct textarea *ta);
|
2013-01-05 19:15:23 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Handle redraw requests for text areas
|
|
|
|
*
|
2013-01-13 00:59:32 +04:00
|
|
|
* \param ta textarea to render
|
|
|
|
* \param x x coordinate of textarea top
|
|
|
|
* \param y y coordinate of textarea left
|
|
|
|
* \param bg background colour under textarea
|
|
|
|
* \param clip clip rectangle
|
2013-01-05 19:15:23 +04:00
|
|
|
* \param ctx current redraw context
|
|
|
|
*/
|
2013-01-13 00:59:32 +04:00
|
|
|
void textarea_redraw(struct textarea *ta, int x, int y, colour bg,
|
2011-06-30 19:48:07 +04:00
|
|
|
const struct rect *clip, const struct redraw_context *ctx);
|
2013-01-05 19:15:23 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Key press handling for text areas.
|
|
|
|
*
|
|
|
|
* \param ta The text area which got the keypress
|
|
|
|
* \param key The ucs4 character codepoint
|
|
|
|
* \return true if the keypress is dealt with, false otherwise.
|
|
|
|
*/
|
2013-01-05 18:52:02 +04:00
|
|
|
bool textarea_keypress(struct textarea *ta, uint32_t key);
|
2013-01-05 19:15:23 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Handles all kinds of mouse action
|
|
|
|
*
|
|
|
|
* \param ta Text area
|
|
|
|
* \param mouse the mouse state at action moment
|
|
|
|
* \param x X coordinate
|
|
|
|
* \param y Y coordinate
|
|
|
|
* \return true if action was handled false otherwise
|
|
|
|
*/
|
2013-01-05 18:52:02 +04:00
|
|
|
bool textarea_mouse_action(struct textarea *ta, browser_mouse_state mouse,
|
Merged revisions 7764-7977,7979-8058 via svnmerge from
svn://svn.netsurf-browser.org/branches/paulblokus/textinput
........
r7769 | paulblokus | 2009-06-11 22:26:16 +0100 (Thu, 11 Jun 2009) | 4 lines
replace global history window with an empty window for future tests
add the necessary files
first lines ported
........
r7771 | paulblokus | 2009-06-11 23:51:46 +0100 (Thu, 11 Jun 2009) | 1 line
more functions
........
r7772 | paulblokus | 2009-06-12 02:07:36 +0100 (Fri, 12 Jun 2009) | 1 line
redraw working
........
r7777 | paulblokus | 2009-06-12 11:35:45 +0100 (Fri, 12 Jun 2009) | 3 lines
plotter fix
make use of the provided clipping rectangle
........
r7781 | paulblokus | 2009-06-12 16:26:51 +0100 (Fri, 12 Jun 2009) | 3 lines
callbacks for taxtarea to request a [caret]redraw
basic caret handling drawing
........
r7782 | paulblokus | 2009-06-12 22:36:50 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7783 | paulblokus | 2009-06-12 22:41:37 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7784 | paulblokus | 2009-06-12 23:55:40 +0100 (Fri, 12 Jun 2009) | 3 lines
fixed caret clipping
arrows, delete and backspace
........
r7812 | paulblokus | 2009-06-16 14:55:41 +0100 (Tue, 16 Jun 2009) | 1 line
remove bug causing NS hang on \n in textarea
........
r7816 | paulblokus | 2009-06-16 16:29:48 +0100 (Tue, 16 Jun 2009) | 1 line
Enter, Home, End keys
........
r7817 | paulblokus | 2009-06-16 16:56:16 +0100 (Tue, 16 Jun 2009) | 1 line
Ctrl + Home/End
........
r7818 | paulblokus | 2009-06-16 17:16:51 +0100 (Tue, 16 Jun 2009) | 1 line
redraw caret only on caret moves
........
r7821 | paulblokus | 2009-06-16 20:18:30 +0100 (Tue, 16 Jun 2009) | 1 line
line end/start delete
........
r7822 | paulblokus | 2009-06-16 23:43:42 +0100 (Tue, 16 Jun 2009) | 1 line
selection drawing + select all
........
r7823 | paulblokus | 2009-06-17 02:31:07 +0100 (Wed, 17 Jun 2009) | 3 lines
auto scrolling on caret moves
clear selection
........
r7845 | paulblokus | 2009-06-18 17:35:03 +0100 (Thu, 18 Jun 2009) | 1 line
page up/down
........
r7846 | paulblokus | 2009-06-18 17:38:45 +0100 (Thu, 18 Jun 2009) | 1 line
remove unnecessary fix
........
r7847 | paulblokus | 2009-06-18 18:00:16 +0100 (Thu, 18 Jun 2009) | 1 line
clipping fixes
........
r7849 | paulblokus | 2009-06-18 18:21:02 +0100 (Thu, 18 Jun 2009) | 1 line
scroll fix
........
r7850 | paulblokus | 2009-06-18 18:45:13 +0100 (Thu, 18 Jun 2009) | 1 line
simplified redraw request logic
........
r7855 | paulblokus | 2009-06-18 19:56:24 +0100 (Thu, 18 Jun 2009) | 1 line
front end passing mouse events
........
r7858 | paulblokus | 2009-06-18 22:18:39 +0100 (Thu, 18 Jun 2009) | 3 lines
drag selection
bug fixes
........
r7860 | paulblokus | 2009-06-18 23:32:39 +0100 (Thu, 18 Jun 2009) | 3 lines
take selection into account on keypress of different types
a few bugs fixed
........
r7876 | paulblokus | 2009-06-19 13:43:07 +0100 (Fri, 19 Jun 2009) | 3 lines
pango nsfont_split fix
a few textarea fixes
........
r7879 | paulblokus | 2009-06-19 17:33:10 +0100 (Fri, 19 Jun 2009) | 4 lines
newline handling seems to work this way
clear selection on mouse click
more bug fixes
........
r7880 | paulblokus | 2009-06-19 18:16:27 +0100 (Fri, 19 Jun 2009) | 3 lines
no caret option
selection follows drag
........
r7883 | paulblokus | 2009-06-19 19:08:44 +0100 (Fri, 19 Jun 2009) | 3 lines
o width selection bug fix
caret at correct side of drag selection
........
r7918 | paulblokus | 2009-06-22 21:01:28 +0100 (Mon, 22 Jun 2009) | 3 lines
fix caret positioning at line end
CR removal in input methods
........
r7919 | paulblokus | 2009-06-22 21:34:39 +0100 (Mon, 22 Jun 2009) | 1 line
fix crash on 0 length text
........
r7926 | paulblokus | 2009-06-23 09:53:56 +0100 (Tue, 23 Jun 2009) | 3 lines
change LF into spaces for single line widget
text normalisation at one place
........
r7931 | paulblokus | 2009-06-23 10:51:25 +0100 (Tue, 23 Jun 2009) | 1 line
cleanup
........
r7933 | paulblokus | 2009-06-23 11:17:22 +0100 (Tue, 23 Jun 2009) | 1 line
fix selection draw
........
r7935 | paulblokus | 2009-06-23 11:41:30 +0100 (Tue, 23 Jun 2009) | 1 line
guard readonly
........
r7942 | paulblokus | 2009-06-24 08:19:39 +0100 (Wed, 24 Jun 2009) | 1 line
applied changes suggested by jmb
........
r7943 | paulblokus | 2009-06-24 09:04:49 +0100 (Wed, 24 Jun 2009) | 1 line
little fixes
........
r7945 | paulblokus | 2009-06-24 12:50:14 +0100 (Wed, 24 Jun 2009) | 1 line
correct line length and wrapping
........
r7947 | paulblokus | 2009-06-24 14:32:36 +0100 (Wed, 24 Jun 2009) | 3 lines
fixed page up/down broken in last commit
changed logic for caret positioning on soft breaks
........
r7949 | paulblokus | 2009-06-24 16:31:42 +0100 (Wed, 24 Jun 2009) | 1 line
remove temporary/test code
........
r7975 | paulblokus | 2009-06-25 16:00:46 +0100 (Thu, 25 Jun 2009) | 1 line
changes suggested by jmb
........
r7976 | paulblokus | 2009-06-25 16:33:23 +0100 (Thu, 25 Jun 2009) | 1 line
added ro_ prefix to RISC OS textarea code
........
svn path=/trunk/netsurf/; revision=8060
2009-06-27 17:59:25 +04:00
|
|
|
int x, int y);
|
2013-01-05 19:15:23 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the dimensions of a textarea
|
|
|
|
*
|
|
|
|
* \param width if not NULL, gets updated to the width of the textarea
|
|
|
|
* \param height if not NULL, gets updated to the height of the textarea
|
|
|
|
*/
|
2013-01-05 18:52:02 +04:00
|
|
|
void textarea_get_dimensions(struct textarea *ta, int *width, int *height);
|
2013-01-05 19:15:23 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the dimensions of a textarea, causing a reflow and
|
|
|
|
* emitting a redraw request.
|
|
|
|
*
|
|
|
|
* \param width the new width of the textarea
|
|
|
|
* \param height the new height of the textarea
|
|
|
|
*/
|
2013-01-05 18:52:02 +04:00
|
|
|
void textarea_set_dimensions(struct textarea *ta, int width, int height);
|
Merged revisions 7764-7977,7979-8058 via svnmerge from
svn://svn.netsurf-browser.org/branches/paulblokus/textinput
........
r7769 | paulblokus | 2009-06-11 22:26:16 +0100 (Thu, 11 Jun 2009) | 4 lines
replace global history window with an empty window for future tests
add the necessary files
first lines ported
........
r7771 | paulblokus | 2009-06-11 23:51:46 +0100 (Thu, 11 Jun 2009) | 1 line
more functions
........
r7772 | paulblokus | 2009-06-12 02:07:36 +0100 (Fri, 12 Jun 2009) | 1 line
redraw working
........
r7777 | paulblokus | 2009-06-12 11:35:45 +0100 (Fri, 12 Jun 2009) | 3 lines
plotter fix
make use of the provided clipping rectangle
........
r7781 | paulblokus | 2009-06-12 16:26:51 +0100 (Fri, 12 Jun 2009) | 3 lines
callbacks for taxtarea to request a [caret]redraw
basic caret handling drawing
........
r7782 | paulblokus | 2009-06-12 22:36:50 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7783 | paulblokus | 2009-06-12 22:41:37 +0100 (Fri, 12 Jun 2009) | 1 line
single character insertion
........
r7784 | paulblokus | 2009-06-12 23:55:40 +0100 (Fri, 12 Jun 2009) | 3 lines
fixed caret clipping
arrows, delete and backspace
........
r7812 | paulblokus | 2009-06-16 14:55:41 +0100 (Tue, 16 Jun 2009) | 1 line
remove bug causing NS hang on \n in textarea
........
r7816 | paulblokus | 2009-06-16 16:29:48 +0100 (Tue, 16 Jun 2009) | 1 line
Enter, Home, End keys
........
r7817 | paulblokus | 2009-06-16 16:56:16 +0100 (Tue, 16 Jun 2009) | 1 line
Ctrl + Home/End
........
r7818 | paulblokus | 2009-06-16 17:16:51 +0100 (Tue, 16 Jun 2009) | 1 line
redraw caret only on caret moves
........
r7821 | paulblokus | 2009-06-16 20:18:30 +0100 (Tue, 16 Jun 2009) | 1 line
line end/start delete
........
r7822 | paulblokus | 2009-06-16 23:43:42 +0100 (Tue, 16 Jun 2009) | 1 line
selection drawing + select all
........
r7823 | paulblokus | 2009-06-17 02:31:07 +0100 (Wed, 17 Jun 2009) | 3 lines
auto scrolling on caret moves
clear selection
........
r7845 | paulblokus | 2009-06-18 17:35:03 +0100 (Thu, 18 Jun 2009) | 1 line
page up/down
........
r7846 | paulblokus | 2009-06-18 17:38:45 +0100 (Thu, 18 Jun 2009) | 1 line
remove unnecessary fix
........
r7847 | paulblokus | 2009-06-18 18:00:16 +0100 (Thu, 18 Jun 2009) | 1 line
clipping fixes
........
r7849 | paulblokus | 2009-06-18 18:21:02 +0100 (Thu, 18 Jun 2009) | 1 line
scroll fix
........
r7850 | paulblokus | 2009-06-18 18:45:13 +0100 (Thu, 18 Jun 2009) | 1 line
simplified redraw request logic
........
r7855 | paulblokus | 2009-06-18 19:56:24 +0100 (Thu, 18 Jun 2009) | 1 line
front end passing mouse events
........
r7858 | paulblokus | 2009-06-18 22:18:39 +0100 (Thu, 18 Jun 2009) | 3 lines
drag selection
bug fixes
........
r7860 | paulblokus | 2009-06-18 23:32:39 +0100 (Thu, 18 Jun 2009) | 3 lines
take selection into account on keypress of different types
a few bugs fixed
........
r7876 | paulblokus | 2009-06-19 13:43:07 +0100 (Fri, 19 Jun 2009) | 3 lines
pango nsfont_split fix
a few textarea fixes
........
r7879 | paulblokus | 2009-06-19 17:33:10 +0100 (Fri, 19 Jun 2009) | 4 lines
newline handling seems to work this way
clear selection on mouse click
more bug fixes
........
r7880 | paulblokus | 2009-06-19 18:16:27 +0100 (Fri, 19 Jun 2009) | 3 lines
no caret option
selection follows drag
........
r7883 | paulblokus | 2009-06-19 19:08:44 +0100 (Fri, 19 Jun 2009) | 3 lines
o width selection bug fix
caret at correct side of drag selection
........
r7918 | paulblokus | 2009-06-22 21:01:28 +0100 (Mon, 22 Jun 2009) | 3 lines
fix caret positioning at line end
CR removal in input methods
........
r7919 | paulblokus | 2009-06-22 21:34:39 +0100 (Mon, 22 Jun 2009) | 1 line
fix crash on 0 length text
........
r7926 | paulblokus | 2009-06-23 09:53:56 +0100 (Tue, 23 Jun 2009) | 3 lines
change LF into spaces for single line widget
text normalisation at one place
........
r7931 | paulblokus | 2009-06-23 10:51:25 +0100 (Tue, 23 Jun 2009) | 1 line
cleanup
........
r7933 | paulblokus | 2009-06-23 11:17:22 +0100 (Tue, 23 Jun 2009) | 1 line
fix selection draw
........
r7935 | paulblokus | 2009-06-23 11:41:30 +0100 (Tue, 23 Jun 2009) | 1 line
guard readonly
........
r7942 | paulblokus | 2009-06-24 08:19:39 +0100 (Wed, 24 Jun 2009) | 1 line
applied changes suggested by jmb
........
r7943 | paulblokus | 2009-06-24 09:04:49 +0100 (Wed, 24 Jun 2009) | 1 line
little fixes
........
r7945 | paulblokus | 2009-06-24 12:50:14 +0100 (Wed, 24 Jun 2009) | 1 line
correct line length and wrapping
........
r7947 | paulblokus | 2009-06-24 14:32:36 +0100 (Wed, 24 Jun 2009) | 3 lines
fixed page up/down broken in last commit
changed logic for caret positioning on soft breaks
........
r7949 | paulblokus | 2009-06-24 16:31:42 +0100 (Wed, 24 Jun 2009) | 1 line
remove temporary/test code
........
r7975 | paulblokus | 2009-06-25 16:00:46 +0100 (Thu, 25 Jun 2009) | 1 line
changes suggested by jmb
........
r7976 | paulblokus | 2009-06-25 16:33:23 +0100 (Thu, 25 Jun 2009) | 1 line
added ro_ prefix to RISC OS textarea code
........
svn path=/trunk/netsurf/; revision=8060
2009-06-27 17:59:25 +04:00
|
|
|
#endif
|
|
|
|
|