/usr/include/xview_private/p_lst_impl.h is in xviewg-dev 3.2p1.4-28.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | /* @(#)p_lst_impl.h 1.50 93/06/28 SMI */
/*
* (c) Copyright 1989 Sun Microsystems, Inc. Sun design patents
* pending in the U.S. and foreign countries. See LEGAL_NOTICE
* file for terms of the license.
*/
#ifndef __panel_list_impl_h
#define __panel_list_impl_h
#include <xview/panel.h>
#include <xview/font.h>
#include <xview/openmenu.h>
#include <xview/scrollbar.h>
typedef struct panel_list_struct Panel_list_info;
typedef struct panel_list_row_struct Row_info;
typedef enum {
OP_NONE,
OP_CHANGE,
OP_INSERT,
OP_DELETE
} Edit_op;
#define PRIMARY_CHOICE 0
#define SHELF_CHOICE 1
#define PANEL_LIST_DEFAULT_ROW 5
/*** Note: Update PANEL_LIST_SORT code when changing this structure. ***/
struct panel_list_row_struct {
Xv_opaque client_data; /* Client data with each row */
int display_str_len; /* length of displayed string */
Xv_Font font; /* NULL => use WIN_FONT */
Pixrect *glyph;
Pixrect *mask_glyph;
int row; /* Row number */
#ifdef OW_I18N
_xv_string_attr_dup_t
string;
#else
char *string;
#endif
int string_y;
Xv_opaque exten_data; /* client data for extensions */
struct timeval click_time; /* double-click detection */
struct {
unsigned edit_selected : 1; /* selected in edit mode */
#ifndef OW_I18N
unsigned free_string : 1; /* free malloc'ed string */
#endif
unsigned selected : 1; /* selected in read mode (= current) */
unsigned show : 1; /* row is to be painted */
unsigned row_inactive : 1; /* row is inactive */
} f; /* flags */
/* Chaining */
struct panel_list_row_struct *next;
struct panel_list_row_struct *prev;
};
struct panel_list_struct {
Panel_item public_self;
Panel parent_panel; /* Panel we're in */
Rect list_box; /* Box enclosing list of rows */
Scrollbar list_sb; /* Scrollbar for list_box */
Menu edit_menu; /* Row panel edit mode menu */
Edit_op edit_op; /* current edit operation, if any */
Row_info *focus_row; /* Location Cursor is on this row */
int focus_win_x; /* x position of focus window */
int focus_win_y; /* y position of focus window */
Xv_Font font; /* font of parent panel */
#ifdef OW_I18N
XFontSet font_set; /* font set of parent panel */
#else
XFontStruct *font_struct; /* font structure of parent panel */
#endif
Menu read_menu; /* Row panel read mode menu */
int sb_active; /* all events go to Scrollbar */
Rect sb_rect; /* Scrollbar window rectangle */
Panel_item text_item; /* Text item used during editing */
Row_info *text_item_row; /* Text item is editing this row */
int text_item_view_start; /* first row in view when text
* item was made visible. */
#ifdef OW_I18N
_xv_string_attr_dup_t
title;
#else
CHAR *title;
#endif
int title_display_str_len;
Rect title_rect;
/* control */
unsigned choose_none: 1; /* no current row is okay */
unsigned choose_one : 1; /* TRUE: exclusive, FALSE: non-exclusive */
unsigned edit_mode : 1; /* TRUE: read-write, FALSE: read */
unsigned focus_win_shown : 1; /* state of XV_SHOW for focus window */
unsigned initialized : 1; /* set of XV_END_CREATE has occurred */
unsigned insert_delete_enabled; /* OK to insert or delete rows */
unsigned insert_duplicate : 1;/* OK to insert duplicate strings */
unsigned left_hand_sb: 1; /* list_box Scrollbar is on left hand side */
unsigned read_only : 1; /* TRUE: read, FALSE: read/write */
unsigned setting_current_row:1;
unsigned destroy_edit_menu:1; /* flags to check if we need to */
unsigned destroy_read_menu:1; /* destroy the edit/read menu */
#ifdef OW_I18N
unsigned stored_length_wc:1; /* TRUE: use PANEL_VALUE_STORED_LENGTH_WCS,
FALSE: use PANEL_VALUE_STORED_LENGTH */
#endif
unsigned do_dbl_click : 1; /* deliver dbl click ops */
/* sizes and positions */
unsigned short nlevels; /* Number of levels */
unsigned short height; /* Height of the scroll list */
int width; /* -1 = extend width to edge of panel
* 0 = fit width to widest row
* other = list box width */
unsigned short nrows; /* Number of rows */
unsigned short rows_displayed; /* Number of rows displayed */
unsigned short row_height; /* Height of each row. 0 => font height */
unsigned short string_x; /* left margin of each row's string */
/* Current data */
Row_info *rows;
Row_info *current_row; /* last row selected */
Row_info *last_edit_row; /* last row selected for editing */
Row_info *last_click_row; /* last row click'd in */
};
#ifdef OW_I18N
#define STRING string.pswcs.value
#define TITLE title.pswcs.value
#define PANEL_VALUE_I18N PANEL_VALUE_WCS
#define PANEL_STRSAVE panel_strsave_wc
#define XV_PF_TEXTWIDTH xv_pf_textwidth_wc
#define NULL_STRING _xv_null_string_wc
#else
#define STRING string
#define TITLE title
#define PANEL_VALUE_I18N PANEL_VALUE
#define PANEL_STRSAVE panel_strsave
#define XV_PF_TEXTWIDTH xv_pf_textwidth
#define NULL_STRING ""
#endif
#endif /* __panel_list_impl_h */
|