428
+ − 1 /* Define general toolbar support.
+ − 2 Copyright (C) 1995 Board of Trustees, University of Illinois.
+ − 3 Copyright (C) 1995, 1996 Ben Wing.
+ − 4 Copyright (C) 1996 Chuck Thompson.
+ − 5
+ − 6 This file is part of XEmacs.
+ − 7
+ − 8 XEmacs is free software; you can redistribute it and/or modify it
+ − 9 under the terms of the GNU General Public License as published by the
+ − 10 Free Software Foundation; either version 2, or (at your option) any
+ − 11 later version.
+ − 12
+ − 13 XEmacs is distributed in the hope that it will be useful, but WITHOUT
+ − 14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ − 15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ − 16 for more details.
+ − 17
+ − 18 You should have received a copy of the GNU General Public License
+ − 19 along with XEmacs; see the file COPYING. If not, write to
+ − 20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ − 21 Boston, MA 02111-1307, USA. */
+ − 22
+ − 23 /* Synched up with: Not in FSF. */
+ − 24
440
+ − 25 #ifndef INCLUDED_toolbar_h_
+ − 26 #define INCLUDED_toolbar_h_
428
+ − 27
+ − 28 #ifdef HAVE_TOOLBARS
+ − 29
+ − 30 #include "specifier.h"
+ − 31
+ − 32 #define FRAME_TOOLBAR_BUTTONS(frame, pos) \
+ − 33 ((frame)->toolbar_buttons[pos])
+ − 34 #define FRAME_CURRENT_TOOLBAR_SIZE(frame, pos) \
+ − 35 ((frame)->current_toolbar_size[pos])
+ − 36 #define DEVICE_SUPPORTS_TOOLBARS_P(d) \
434
+ − 37 HAS_DEVMETH_P (d, output_frame_toolbars)
428
+ − 38
+ − 39 struct toolbar_button
+ − 40 {
+ − 41 struct lcrecord_header header;
+ − 42
+ − 43 Lisp_Object next;
+ − 44 Lisp_Object frame;
+ − 45
+ − 46 Lisp_Object up_glyph;
+ − 47 Lisp_Object down_glyph;
+ − 48 Lisp_Object disabled_glyph;
+ − 49
+ − 50 Lisp_Object cap_up_glyph;
+ − 51 Lisp_Object cap_down_glyph;
+ − 52 Lisp_Object cap_disabled_glyph;
+ − 53
+ − 54 Lisp_Object callback;
+ − 55 Lisp_Object enabled_p;
+ − 56 Lisp_Object help_string;
+ − 57
+ − 58 char enabled;
+ − 59 char down;
+ − 60 char pushright;
+ − 61 char blank;
+ − 62
+ − 63 int x, y;
+ − 64 int width, height;
+ − 65 int dirty;
+ − 66 /* is this button in a left or right toolbar? */
+ − 67 int vertical;
+ − 68 /* border_width when this button was laid out */
+ − 69 int border_width;
+ − 70 };
+ − 71
+ − 72 DECLARE_LRECORD (toolbar_button, struct toolbar_button);
+ − 73 #define XTOOLBAR_BUTTON(x) XRECORD (x, toolbar_button, struct toolbar_button)
617
+ − 74 #define wrap_toolbar_button(p) wrap_record (p, toolbar_button)
428
+ − 75 #define TOOLBAR_BUTTONP(x) RECORDP (x, toolbar_button)
+ − 76 #define CHECK_TOOLBAR_BUTTON(x) CHECK_RECORD (x, toolbar_button)
+ − 77 #define CONCHECK_TOOLBAR_BUTTON(x) CONCHECK_RECORD (x, toolbar_button)
+ − 78
+ − 79 void get_toolbar_coords (struct frame *f, enum toolbar_pos pos, int *x,
+ − 80 int *y, int *width, int *height, int *vert,
+ − 81 int for_layout);
+ − 82 Lisp_Object toolbar_button_at_pixpos (struct frame *f, int x_coord,
+ − 83 int y_coord);
+ − 84 DECLARE_SPECIFIER_TYPE (toolbar);
+ − 85 #define XTOOLBAR_SPECIFIER(x) XSPECIFIER_TYPE (x, toolbar)
+ − 86 #define TOOLBAR_SPECIFIERP(x) SPECIFIER_TYPEP (x, toolbar)
+ − 87 #define CHECK_TOOLBAR_SPECIFIER(x) CHECK_SPECIFIER_TYPE (x, toolbar)
+ − 88 #define CONCHECK_TOOLBAR_SPECIFIER(x) CONCHECK_SPECIFIER_TYPE (x, toolbar)
+ − 89
+ − 90 #define MSWINDOWS_DEFAULT_TOOLBAR_HEIGHT 37
+ − 91 #define MSWINDOWS_DEFAULT_TOOLBAR_WIDTH 40
+ − 92 #define MSWINDOWS_DEFAULT_TOOLBAR_BORDER_WIDTH 0
+ − 93 #define DEFAULT_TOOLBAR_HEIGHT 37
+ − 94 #define DEFAULT_TOOLBAR_WIDTH 40
+ − 95 #define DEFAULT_TOOLBAR_BLANK_SIZE 8
+ − 96 #define DEFAULT_TOOLBAR_BORDER_WIDTH 0
+ − 97 #define MINIMUM_SHADOW_THICKNESS 1
+ − 98
+ − 99 extern Lisp_Object Vtoolbar_size[4];
+ − 100 extern Lisp_Object Vtoolbar_border_width[4];
+ − 101 void update_frame_toolbars (struct frame *f);
905
+ − 102 void update_frame_toolbars_geometry (struct frame *f);
428
+ − 103 void init_frame_toolbars (struct frame *f);
+ − 104 void init_device_toolbars (struct device *d);
+ − 105 void init_global_toolbars (struct device *d);
+ − 106 void free_frame_toolbars (struct frame *f);
+ − 107 Lisp_Object get_toolbar_button_glyph (struct window *w,
+ − 108 struct toolbar_button *tb);
+ − 109 void mark_frame_toolbar_buttons_dirty (struct frame *f, enum toolbar_pos pos);
+ − 110
+ − 111 #endif /* HAVE_TOOLBARS */
+ − 112
440
+ − 113 #endif /* INCLUDED_toolbar_h_ */