⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 panel_impl.h

📁 操作系统SunOS 4.1.3版本的源码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* Note that the first two fields of the * panel struct must match those of the panel_item * struct, since these are used interchangably in  * some cases. */struct panel	{        panel_ops_handle	ops;		/* panel specific operations */   	u_int			flags;		/* default item flags */	struct {	   u_int left_down	: 1;		/* status of left button */	   u_int middle_down	: 1;		/* status of middle button */	   u_int right_down	: 1;		/* status of right button */	} button_status;	Panel_setting		mouse_state;	/* state of mouse buttons */	int			windowfd;	Pixwin		       *pixwin;	Pixwin		       *view_pixwin;	Rect			rect;	Pixfont		       *font;	char			edit_bk_char;	char			edit_bk_word;	char			edit_bk_line;        Panel_setting		layout;		/* HORIZONTAL, VERTICAL */	u_int			status;		/* current event state */	int			item_x;	int			item_y;	int			item_x_offset;	int			item_y_offset;	int			max_item_y;	/* lowest item on row */	panel_item_handle	items;	panel_item_handle	current;	panel_item_handle	caret;	int			caret_on;        int			(*timer_proc)();        int			(*event_proc)();	struct timeval		timer;		/* timer for the sw */	struct timeval		timer_full;	/* initial secs & usecs */	caddr_t			client_data;	/* for client use */	caddr_t			help_data;	/* for help use */        int			SliderActive;	/* TRUE if slider is previewing */        Panel_setting		repaint;	/* default repaint behavior  */	Toolsw		       *toolsw;		/* for setting width, height */        Scrollbar		v_scrollbar;	/* vertical scrollbar        */	int			v_bar_width;	/* width of vertical sb      */        int			v_offset;	/* top of viewing window     */        int			v_end;		/* bottom populated pixel    */        int			v_margin;	/* gap at top for scrolling  */        Scrollbar		h_scrollbar;	/* horizontal scrollbar      */	int			h_bar_width;	/* width of horizontal sb    */        int			h_offset;	/* left of viewing window    */        int			h_end;		/* rightmost populated pixel */        int			h_margin;	/* gap at left for scrolling */	Tool			*tool;		/* for CLOSE, TOP */	caddr_t			seln_client;	/* selection svc client id */	struct panel_selection	selections[(int) SELN_UNSPECIFIED];	char			*shelf;		/* contents of shelf seln */	struct pixrect		*caret_pr;	/* current caret pixrect */};#define has_scrollbar(panel) (((panel)->v_scrollbar) || ((panel)->h_scrollbar))#define has_background_proc(panel) \	((panel)->ops && (panel)->ops->handle_event && \	(panel)->ops->handle_event != panel_nullproc)/*************************** panel item ***********************************//* types of items */typedef enum {    PANEL_MESSAGE_ITEM,   PANEL_BUTTON_ITEM,    PANEL_CHOICE_ITEM,    PANEL_TOGGLE_ITEM,    PANEL_TEXT_ITEM,   PANEL_SLIDER_ITEM,   PANEL_LINE_ITEM} PANEL_ITEM_TYPE;    /* Note that the first two fields of the * panel_item struct must match those of the panel * struct, since these are used interchangably in  * some cases. */struct panel_item {   panel_ops_handle	ops;		/* item type specific operations */   u_int		flags;		/* boolean attributes */   PANEL_ITEM_TYPE	item_type;	/* type of this item */   panel_handle		panel;		/* panel subwindow for the item */   caddr_t		data;		/* item type specific data */   Rect			painted_rect;	/* painted area in the pw */   Rect			rect;		/* enclosing item rect */   struct panel_image	label;		/* the label */   Rect			label_rect;	/* enclosing label rect */   Rect			value_rect;	/* enclosing label rect */   Panel_setting	layout;	        /* HORIZONTAL, VERTICAL */   int			(*notify)();	/* notify proc */   struct menu	 	*menu;		/* menu of choices */   struct panel_image 	 menu_title;	/* menu title string/image */   struct panel_image 	*menu_choices;	/* each menu choice */   short		 menu_last;	/* last slot in menu_choices[] */   short		 menu_choices_bold;	/* bold/regular choices */   caddr_t		*menu_values;	/* value for each menu item */   Pixrect 		*menu_type_pr;	/* title type indication */   Pixrect 		*menu_mark_on;	/* selected menu mark image */   Pixrect 		*menu_mark_off;		/* un-sel. menu mark image*/   short 		 menu_mark_width;	/* width of menu mark */   short		 menu_mark_height;	/* height of menu mark */   short		 menu_max_width;	/* width of the whole menu */   struct {				/* status of menu attributes */       u_int title_set		: 1;      u_int title_font_set	: 1;      u_int choices_set		: 1;      u_int choice_fonts_set	: 1;      u_int title_dirty		: 1;   } menu_status;   Panel_setting      repaint;		/* item's repaint behavior */   panel_item_handle  next; 		/* next item */   caddr_t	      client_data;	/* for client use */   caddr_t	      help_data;	/* for help use */   int		      color_index;	/* for color panel items */};/***********************************************************************//* external declarations of private functions                          *//***********************************************************************/extern 	panel_handle	 	panel_create_panel_struct();extern 	int	 		panel_set_panel();extern 	caddr_t	 		panel_get_panel();extern 	panel_item_handle 	panel_successor();extern 	struct pr_size 		panel_make_image();extern  int			panel_set_generic();extern  caddr_t			panel_get_generic();extern 	Rect			panel_enclosing_rect();extern 	panel_item_handle 	panel_append();extern  int		 	panel_col_to_x();extern  int		 	panel_row_to_y();extern  char                   *panel_strsave();extern int 			panel_nullproc();extern int 			panel_fonthome();extern struct menuitem 	       *panel_menu_display();extern void			panel_sync_menu_title();extern void			panel_copy_menu_title();extern void			panel_copy_menu_choices();extern				panel_find_default_xy();/* pixwin writing routines */extern int			panel_pw_write();extern int			panel_pw_writebackground();extern int			panel_pw_replrop();extern int			panel_pw_vector();extern int			panel_pw_text();extern int			panel_pw_lock();extern int			panel_draw_box();/* paint routines */extern void			panel_display();extern int                      panel_paint_item();extern void			panel_resize();extern Notify_value		panel_use_event();extern void			panel_caret_on();extern void			panel_caret_invert();/* selection service routines */extern void			panel_seln_init();extern void			panel_seln_destroy();extern void			panel_seln_inform();extern Seln_holder		panel_seln_inquire();extern void			panel_seln_acquire();extern void			panel_seln_cancel();extern void			panel_seln_dehilite();extern void			panel_seln_hilite();/* scrollbar routines */extern void	                panel_scroll();extern void			panel_setup_scrollbar();extern void			panel_update_extent();extern void			panel_resize_region();extern void			panel_update_scrollbars();extern Notify_value		panel_notify_event();extern Notify_value		panel_destroy();/* for backwards compatability */extern Toolsw			*panel_create_sw();/* for lint */extern char			*calloc();/***********************************************************************//* external declarations of private data                               *//***********************************************************************/extern	Pixrect			panel_empty_pr;extern	Pixrect			panel_caret_pr;extern	Pixrect			panel_ghost_caret_pr;/*************************************************************************//* miscellaneous private macros                                          *//*************************************************************************/#define	set(value)	((value) != -1) #ifndef LINT_CAST#ifdef lint#define LINT_CAST(arg)  (arg ? 0 : 0)#else#define LINT_CAST(arg)  arg#endif#endif LINT_CAST#define	PANEL_CAST(client_panel)	\    ((panel_handle) LINT_CAST(client_panel))#define	PANEL_ITEM_CAST(client_item)	\    ((panel_item_handle) LINT_CAST(client_item))#endif menu_SKIP #ifdef menu_SKIP#undef menu_SKIP#endif menu_SKIP/*************************************************************************/#endif !panel_impl_DEFINED

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -