From 6173bb0e6c3bf51cd463f7bc4f725429d9087b2b Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 5 Oct 2010 19:14:46 +0000 Subject: Merge treeview-redux to trunk svn path=/trunk/netsurf/; revision=10865 --- riscos/treeview.h | 49 +++++++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) (limited to 'riscos/treeview.h') diff --git a/riscos/treeview.h b/riscos/treeview.h index df718fc7a..7aa129e1b 100644 --- a/riscos/treeview.h +++ b/riscos/treeview.h @@ -1,5 +1,6 @@ /* * Copyright 2004 Richard Wilson + * Copyright 2010 Stephen Fryatt * * This file is part of NetSurf, http://www.netsurf-browser.org/ * @@ -24,38 +25,30 @@ #define _NETSURF_RISCOS_TREEVIEW_H_ #include -#include "oslib/osspriteop.h" -#include "oslib/wimp.h" +#include +#include + #include "desktop/tree.h" -#include "image/bitmap.h" -#define TREE_TEXT_HEIGHT 40 -#define TREE_SPRITE_WIDTH 40 /* text plus sprite entries only */ +typedef struct ro_treeview ro_treeview; -struct node_sprite { - osspriteop_area *area; - char name[12]; - char expanded_name[12]; +struct ro_treeview_table { + void (*open_menu)(wimp_pointer *pointer); }; -bool ro_gui_tree_initialise(void); -void ro_gui_tree_redraw(wimp_draw *redraw); -bool ro_gui_tree_click(wimp_pointer *pointer, struct tree *tree); -void ro_gui_tree_menu_closed(struct tree *tree); -bool ro_gui_tree_toolbar_click(wimp_pointer* pointer); -void ro_gui_tree_stop_edit(struct tree *tree); -void ro_gui_tree_open(wimp_open *open); -void ro_gui_tree_show(struct tree *tree); -bool ro_gui_tree_keypress(wimp_key *key); -void ro_gui_tree_selection_drag_end(wimp_dragged *drag); -void ro_gui_tree_move_drag_end(wimp_dragged *drag); -void ro_gui_tree_launch_selected(struct tree *tree); -void ro_gui_tree_start_edit(struct tree *tree, struct node_element *element, - wimp_pointer *pointer); -void ro_gui_tree_scroll_visible(struct tree *tree, struct node_element *element); -void ro_gui_tree_get_tree_coordinates(struct tree *tree, int x, int y, - int *tree_x, int *tree_y); -int ro_gui_tree_help(int x, int y); -void ro_gui_tree_update_theme(struct tree *tree); +ro_treeview *ro_treeview_create(wimp_w window, struct toolbar *toolbar, + unsigned int flags); +void ro_treeview_destroy(ro_treeview *tv); + +struct tree *ro_treeview_get_tree(ro_treeview *tv); +wimp_w ro_treeview_get_window(ro_treeview *tv); +bool ro_treeview_has_selection(ro_treeview *tv); + +void ro_treeview_set_origin(ro_treeview *tv, int x, int y); +void ro_treeview_mouse_at(wimp_w w, wimp_pointer *pointer); +bool ro_gui_treeview_toolbar_click(wimp_pointer *pointer); +void ro_treeview_update_theme(ro_treeview *tv); +int ro_treeview_get_help(help_full_message_request *message_data); #endif + -- cgit v1.2.3