1 /*************************************************************************** 2 * Copyright (c) 2024 Microsoft Corporation 3 * 4 * This program and the accompanying materials are made available under the 5 * terms of the MIT License which is available at 6 * https://opensource.org/licenses/MIT. 7 * 8 * SPDX-License-Identifier: MIT 9 **************************************************************************/ 10 11 12 /**************************************************************************/ 13 /**************************************************************************/ 14 /** */ 15 /** GUIX Component */ 16 /** */ 17 /** Tree View Management (Tree View) */ 18 /** */ 19 /**************************************************************************/ 20 /**************************************************************************/ 21 22 /**************************************************************************/ 23 /* */ 24 /* COMPONENT DEFINITION RELEASE */ 25 /* */ 26 /* gx_tree_view.h PORTABLE C */ 27 /* 6.1 */ 28 /* AUTHOR */ 29 /* */ 30 /* Kenneth Maxwell, Microsoft Corporation */ 31 /* */ 32 /* DESCRIPTION */ 33 /* */ 34 /* This file defines the GUIX tree view component, including all data */ 35 /* types and external references. It is assumed that gx_api.h and */ 36 /* gx_port.h have already been included. */ 37 /* */ 38 /* RELEASE HISTORY */ 39 /* */ 40 /* DATE NAME DESCRIPTION */ 41 /* */ 42 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ 43 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ 44 /* resulting in version 6.1 */ 45 /* */ 46 /**************************************************************************/ 47 48 #ifndef GX_TREE_VIEW_H 49 #define GX_TREE_VIEW_H 50 51 #define GX_TREE_VIEW_ROOT_LINE_PATTERN 0x55555555 52 53 /* Define tree view management function prototypes. */ 54 55 UINT _gx_tree_view_create(GX_TREE_VIEW *tree, GX_CONST GX_CHAR *name, GX_WIDGET *parent, 56 ULONG style, USHORT tree_menu_id, GX_CONST GX_RECTANGLE *size); 57 VOID _gx_tree_view_draw(GX_TREE_VIEW *tree); 58 UINT _gx_tree_view_event_process(GX_TREE_VIEW *tree, GX_EVENT *event_ptr); 59 UINT _gx_tree_view_indentation_set(GX_TREE_VIEW *tree, GX_VALUE indentation); 60 UINT _gx_tree_view_position(GX_TREE_VIEW *tree); 61 UINT _gx_tree_view_root_line_color_set(GX_TREE_VIEW *tree, GX_RESOURCE_ID color); 62 UINT _gx_tree_view_root_pixelmap_set(GX_TREE_VIEW *tree, GX_RESOURCE_ID expand_map_id, GX_RESOURCE_ID collapse_map_id); 63 UINT _gx_tree_view_scroll(GX_TREE_VIEW *tree, GX_VALUE x_scroll, GX_VALUE y_scroll); 64 UINT _gx_tree_view_scroll_info_get(GX_TREE_VIEW *tree, ULONG type, GX_SCROLL_INFO *return_scroll_info); 65 UINT _gx_tree_view_selected_get(GX_TREE_VIEW *tree, GX_WIDGET **selected); 66 UINT _gx_tree_view_selected_set(GX_TREE_VIEW *tree, GX_WIDGET *selected); 67 68 /* error checking versions of the tree view API functions */ 69 70 UINT _gxe_tree_view_create(GX_TREE_VIEW *tree, GX_CONST GX_CHAR *name, GX_WIDGET *parent, 71 ULONG style, USHORT tree_id, GX_CONST GX_RECTANGLE *size, UINT control_block_size); 72 UINT _gxe_tree_view_event_process(GX_TREE_VIEW *tree, GX_EVENT *event_ptr); 73 UINT _gxe_tree_view_indentation_set(GX_TREE_VIEW *tree, GX_VALUE indentation); 74 UINT _gxe_tree_view_position(GX_TREE_VIEW *tree); 75 UINT _gxe_tree_view_root_line_color_set(GX_TREE_VIEW *tree, GX_RESOURCE_ID color); 76 UINT _gxe_tree_view_root_pixelmap_set(GX_TREE_VIEW *tree, GX_RESOURCE_ID expand_map_id, GX_RESOURCE_ID collapse_map_id); 77 UINT _gxe_tree_view_selected_get(GX_TREE_VIEW *tree, GX_WIDGET **selected); 78 UINT _gxe_tree_view_selected_set(GX_TREE_VIEW *tree, GX_WIDGET *selected); 79 80 #endif 81 82