comparison src/glyphs-widget.c @ 3094:ad2f4ae9895b

[xemacs-hg @ 2005-11-26 11:45:47 by stephent] Xft merge. <87k6ev4p8q.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Sat, 26 Nov 2005 11:46:25 +0000
parents ecf1ebac70d8
children 4d52aea479a2
comparison
equal deleted inserted replaced
3093:769dc945b085 3094:ad2f4ae9895b
344 lot of the state variables. 344 lot of the state variables.
345 345
346 #### property is still a valid function since we have to be able to 346 #### property is still a valid function since we have to be able to
347 extract information from the actual widget. 347 extract information from the actual widget.
348 348
349 #### update_widget should probably be re-written to use the 349 #### widget_update should probably be re-written to use the
350 instantiator. We probably want to keep a record of the differences 350 instantiator. We probably want to keep a record of the differences
351 also to make this easy. We would also need a pending_instantiator 351 also to make this easy. We would also need a pending_instantiator
352 so that changes could be delayed. */ 352 so that changes could be delayed. */
353 static void 353 static void
354 widget_update (Lisp_Object image_instance, Lisp_Object instantiator) 354 widget_update (Lisp_Object image_instance, Lisp_Object instantiator)
1294 1294
1295 Another sizing problem is alignment. We provide layout widgets that 1295 Another sizing problem is alignment. We provide layout widgets that
1296 allow users to stack widgets vertically or horizontally. These 1296 allow users to stack widgets vertically or horizontally. These
1297 layouts also allow the widgets to be centered (space evenly 1297 layouts also allow the widgets to be centered (space evenly
1298 distributed), left or right justified (fixed spacing widgets 1298 distributed), left or right justified (fixed spacing widgets
1299 stacked against the left, righ, top or bottom edge). Unfortunately 1299 stacked against the left, right, top or bottom edge). Unfortunately
1300 this doesn't allow widgets in different layouts to be aligned. For 1300 this doesn't allow widgets in different layouts to be aligned. For
1301 instance how should the search dialog be organized for alignment? 1301 instance how should the search dialog be organized for alignment?
1302 The obvious choice of two vertical columns does not work since the 1302 The obvious choice of two vertical columns does not work since the
1303 size of individual widgets will affect where they get placed. The 1303 size of individual widgets will affect where they get placed. The
1304 same is true for several rows of widgets. To solve this problem we 1304 same is true for several rows of widgets. To solve this problem we
1640 return 1; 1640 return 1;
1641 } 1641 }
1642 1642
1643 DEFUN ("widget-logical-to-character-width", Fwidget_logical_to_character_width, 1, 3, 0, /* 1643 DEFUN ("widget-logical-to-character-width", Fwidget_logical_to_character_width, 1, 3, 0, /*
1644 Convert the width in logical widget units to characters. 1644 Convert the width in logical widget units to characters.
1645 Logical widget units do not take into account adjusments made for 1645 Logical widget units do not take into account adjustments made for
1646 layout borders, so this adjusment is approximated. 1646 layout borders, so this adjustment is approximated.
1647 */ 1647 */
1648 (width, UNUSED (face), domain)) 1648 (width, UNUSED (face), domain))
1649 { 1649 {
1650 int w, neww, charwidth; 1650 int w, neww, charwidth;
1651 int border_width = DEFAULT_WIDGET_BORDER_WIDTH; 1651 int border_width = DEFAULT_WIDGET_BORDER_WIDTH;
1666 return make_int (neww); 1666 return make_int (neww);
1667 } 1667 }
1668 1668
1669 DEFUN ("widget-logical-to-character-height", Fwidget_logical_to_character_height, 1, 3, 0, /* 1669 DEFUN ("widget-logical-to-character-height", Fwidget_logical_to_character_height, 1, 3, 0, /*
1670 Convert the height in logical widget units to characters. 1670 Convert the height in logical widget units to characters.
1671 Logical widget units do not take into account adjusments made for 1671 Logical widget units do not take into account adjustments made for
1672 layout borders, so this adjustment is approximated. 1672 layout borders, so this adjustment is approximated.
1673 1673
1674 If the components of a widget layout are justified to the top or the 1674 If the components of a widget layout are justified to the top or the
1675 bottom then they are aligned in terms of `logical units'. This is a 1675 bottom then they are aligned in terms of `logical units'. This is a
1676 size quantity that is designed to be big enough to accomodate the 1676 size quantity that is designed to be big enough to accomodate the
1817 IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_height, 1817 IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_height,
1818 check_valid_int_or_function); 1818 check_valid_int_or_function);
1819 IIFORMAT_VALID_KEYWORD (scrollbar, Q_face, check_valid_face); 1819 IIFORMAT_VALID_KEYWORD (scrollbar, Q_face, check_valid_face);
1820 } 1820 }
1821 1821
1822 static void image_instantiator_progress_guage (void) 1822 static void image_instantiator_progress_gauge (void)
1823 { 1823 {
1824 INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (progress_gauge, "progress-gauge"); 1824 INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (progress_gauge, "progress-gauge");
1825 IIFORMAT_HAS_SHARED_METHOD (progress_gauge, validate, widget); 1825 IIFORMAT_HAS_SHARED_METHOD (progress_gauge, validate, widget);
1826 IIFORMAT_HAS_SHARED_METHOD (progress_gauge, possible_dest_types, widget); 1826 IIFORMAT_HAS_SHARED_METHOD (progress_gauge, possible_dest_types, widget);
1827 IIFORMAT_HAS_SHARED_METHOD (progress_gauge, instantiate, widget); 1827 IIFORMAT_HAS_SHARED_METHOD (progress_gauge, instantiate, widget);
1925 image_instantiator_widget(); 1925 image_instantiator_widget();
1926 image_instantiator_buttons(); 1926 image_instantiator_buttons();
1927 image_instantiator_edit_fields(); 1927 image_instantiator_edit_fields();
1928 image_instantiator_combo_box(); 1928 image_instantiator_combo_box();
1929 image_instantiator_scrollbar(); 1929 image_instantiator_scrollbar();
1930 image_instantiator_progress_guage(); 1930 image_instantiator_progress_gauge();
1931 image_instantiator_tree_view(); 1931 image_instantiator_tree_view();
1932 image_instantiator_tab_control(); 1932 image_instantiator_tab_control();
1933 image_instantiator_labels(); 1933 image_instantiator_labels();
1934 image_instantiator_layout(); 1934 image_instantiator_layout();
1935 image_instantiator_native_layout(); 1935 image_instantiator_native_layout();