Commit Graph

184 Commits

Author SHA1 Message Date
Michael Drake
4d84222654 Treeview: Update search bar display when it loses focus. 2017-09-18 23:18:44 +01:00
Michael Drake
f211b6c89a Treeview: Only let search textarea consume mouse if not dragging. 2017-09-18 23:18:44 +01:00
Michael Drake
89dd127a80 Treeview: Update mouse handling details for filtered view.
No moves are allowed in viltered view.
Node indents are constant in filtered view.
2017-09-18 23:18:44 +01:00
Michael Drake
283fb36339 Treeview: Update treeview walker to handle walking the filtered display. 2017-09-18 23:18:44 +01:00
Michael Drake
f142b3684c Treeview: Track height of display in search view. 2017-09-18 23:18:44 +01:00
Michael Drake
45a7e6269b Treeview: Slight simplification of treeview_walk_internal(). 2017-09-18 23:18:44 +01:00
Michael Drake
0a0ad71bdb Treeview: Fix function namespace. 2017-09-18 23:18:44 +01:00
Michael Drake
db6b3441c4 Treeview: Scroll to top when treeview search bar is modified. 2017-09-18 23:18:44 +01:00
Michael Drake
c20ad21273 Treeview: Add support for rendering search filter matches as-you-type. 2017-09-10 15:53:15 +01:00
Michael Drake
c478f35c81 Treeview: Split tree-style treeview rendering out into helper. 2017-09-10 15:53:15 +01:00
Michael Drake
f41f7486ba Treeview: Add node matching to search text modification callback. 2017-09-10 15:53:15 +01:00
Michael Drake
50688cde51 Treeview: Improve some code wrapping. 2017-09-10 15:53:15 +01:00
Michael Drake
37127c4a52 Treeview: Ensure window extents take account of search bar presence. 2017-09-10 15:53:15 +01:00
Michael Drake
43cdd74221 Treeview: Add keypress handling to the search bar. 2017-09-10 15:53:15 +01:00
Michael Drake
3a02a4ea48 Treeview: Handle mouse clicks on search bar. 2017-09-10 15:53:15 +01:00
Michael Drake
adbcb7f1b9 Treeview: Update treeview mouse handling to offset for search bar presence. 2017-09-10 15:53:15 +01:00
Michael Drake
f877069399 Treeview: Add search bar rendering to redraw function. 2017-09-10 15:53:15 +01:00
Michael Drake
3d2adf4330 Treeview: Create and destroy a textarea for search. 2017-09-10 15:53:15 +01:00
Michael Drake
1420d01a21 Treeview: Add search drag type to enumeration. 2017-09-10 15:53:15 +01:00
Michael Drake
02a8b5bca0 Treeview: Split out textarea construction helper. 2017-09-09 14:38:49 +01:00
Vincent Sanders
75018632a9 Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done

@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 18:45:27 +01:00
Vincent Sanders
ac732fb79d update invalidate area core window API
slightly extends the invalidate core window API with error return and
whole window invalidation. Also renames it to be more inline with
browser window API call.

cannot quite reuse browser window API yet as that applies scaling
2017-05-23 09:41:29 +01:00
Vincent Sanders
2f5e5620e2 Change interface to system colours to allow reporting of errors
Allow system colour interface to report errors instead of silently
failing and propogate the errors. This also fixes teh system colour
documentation.
2017-03-01 12:50:30 +00:00
Vincent Sanders
e72b89ac3d Improve treeview documentation comments 2017-02-28 23:41:48 +00:00
Vincent Sanders
6741b6e287 clean up incorrect documentation comments from plotter API rework 2017-02-14 23:06:04 +00:00
Vincent Sanders
7d660561cc Update knockout plotter to use new API 2017-02-11 13:57:06 +00:00
Vincent Sanders
3722ff8d86 Update all core use of plotters to new API 2017-02-11 13:55:41 +00:00
Vincent Sanders
70d700b26c rationalise use of utils/utils.h header 2017-01-19 21:15:08 +00:00
Michael Drake
ded1979fa1 Treeview: Add API for attaching and detaching from corewindows. 2016-12-29 14:43:38 +00:00
Michael Drake
7750d926ad Treeview: Allow treeview to be created "detached".
This allows treeviews to be constructed before their corewindow.
2016-12-29 14:42:25 +00:00
Michael Drake
93fdbcc6de Treeview: Don't call corewindow callbacks if not attached to a corewindow. 2016-12-29 14:40:54 +00:00
Michael Drake
b93ae2c28f Treeview: Convert to using corewindow callback wrappers. 2016-12-29 14:39:44 +00:00
Michael Drake
fb0cdfed79 Treeview: Add wrappers for corewindow callbacks.
Currently unused.
2016-12-29 14:29:48 +00:00
Vincent Sanders
c8c7de976a Fix crash when treeview widget is reinitialised
The treeview widget can be repeatedly finialised and initialised. The
content ready flag was not being cleard on initialisation so content
was being used in an bad state. For example this caused an assert when
content_redraw() was called on non-ready resource handles.
2016-12-28 15:25:46 +00:00
Vincent Sanders
a8a6098f68 move core window API into netsurf header path 2016-08-18 21:07:04 +01:00
Michael Drake
1457a049bb Treeview: Add treeview_font_size to options.
Default is 11pt, and RISC OS overrides to 12pt.
2016-08-11 08:15:21 +01:00
Michael Drake
9aecf47408 Treeview: Rationalise initialisation and finalisation.
Previously the expected behaviour for front ends using the correct
API for hotlist, global history, cookie manager, and ssl cert
viewer was that the front end would initialise the treeview module
on startup and finalise it on application exit.

However, this meant that the front ends had to include the core
treeview header, which they didn't otherwise need.

Since the tree module provided access to the new treeview utilities
through the old tree API, and was used by front ends with no changes
for the new treeview API, the tree layer refcounted initialisations
of treeview-based widgets, and only called the underlying treeview
init/fini functions when needed.

This change moves that refcounting into the treeview module.  Now
the hotlist, global history, cookie manager, and ssl cert viewer
widgets call call treeview init/fini as part of their own
initialisation and finalisation.  This means that front ends
using the correct APIs for treeview-based widgets don't need to
know anything about the underlying treeview, and the tree module
compatibility layer has had its treeview refcounting removed.

Finally, the treeview_init function took a font size parameter.
Now it does not and lit gets font size from config.  We probably
want to add a new `treeview_font_size` option to nsoptions, and
have differnent defaults on different platforms. 12pt on RISC OS,
and 11pt elsewhere, most likely.
2016-08-10 18:57:36 +01:00
Vincent Sanders
8066d1c8b4 move key press enums and operations to their own header 2016-07-01 14:27:04 +01:00
Vincent Sanders
0ae788752c remove unecessary textinput header use from treeview header 2016-06-30 16:12:06 +01:00
Vincent Sanders
8861923455 Allow include directories to be added by sub makefiles 2016-06-06 14:47:27 +01:00
Vincent Sanders
76a68d7dd0 Update content to split public and internal API 2016-06-06 09:01:38 +01:00
Vincent Sanders
667605869f move plotters header into public API 2016-05-30 21:05:57 +01:00
Vincent Sanders
9ce71876ce move layout header into public API 2016-05-30 11:31:35 +01:00
Vincent Sanders
d240bec036 move clipboard header into public API 2016-05-30 11:04:32 +01:00
Vincent Sanders
2dab078f21 move bitmap API header to core include directory 2016-05-26 23:01:03 +01:00
Vincent Sanders
6722943b81 move the CSS content handler 2016-05-26 11:18:41 +01:00
Vincent Sanders
3224d7121a move image content handlers to accomodate core build changes 2016-05-23 23:32:16 +01:00
Vincent Sanders
974a4a21e1 split out the layout glyph sizing and splitting API
This refactors the core "font" sizing API to be handled through gui
 function tables similar to every other core/frontend calling API.
2016-04-23 23:32:21 +01:00
Vincent Sanders
c105738fa3 Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all
callsites to have double bracketing and allows for future improvement
on how we use the logging macros.

The callsites were changed with coccinelle and the changes checked by
hand. Compile tested for several frontends but not all.

A formatting annotation has also been added which allows the compiler
to check the parameters and types passed to the logging.
2015-05-28 16:08:46 +01:00
Vincent Sanders
f37e52c394 Move bitmap operations into an operation table.
The generic bitmap handlers provided by each frontend are called back
from the core and therefore should be in an operation table. This was
one of the very few remaining interfaces stopping the core code from
being split into a library.
2015-04-13 23:19:04 +01:00