Mercurial > emacs
annotate leim/quail/lrt.el @ 109581:06384b3caebf
Add ability to put Gtk+ tool bar on the left/right/bottom or top. Default top.
* lisp/menu-bar.el (menu-bar-showhide-tool-bar-menu-customize-enable-left)
(menu-bar-showhide-tool-bar-menu-customize-disable)
(menu-bar-showhide-tool-bar-menu-customize-enable-right)
(menu-bar-showhide-tool-bar-menu-customize-enable-top)
(menu-bar-showhide-tool-bar-menu-customize-enable-bottom): New functions
(menu-bar-showhide-tool-bar-menu): If tool bar is moveable,
make a menu for Options => toolbar that can move it.
* src/frame.c (Qtool_bar_position): New variable.
(make_frame): Set tool_bar_position to Qtop.
(frame_parms): Add tool-bar-position.
(x_report_frame_params): Store tool_bar_position.
(x_set_fringe_width): Reset wm size hint after fringe changes.
* src/frame.h (struct frame): Add tool_bar_position.
(Qbottom): Declare.
* src/gtkutil.c (FRAME_TOTAL_PIXEL_WIDTH): New macro.
(xg_frame_set_char_size): Add FRAME_TOOLBAR_WIDTH to pixelwidth.
(xg_height_or_width_changed): Use FRAME_TOTAL_PIXEL_WIDTH.
(xg_create_frame_widgets): Create a hobox for placing widgets
vertically. Use gtk_box_pack_start.
(xg_height_or_width_changed): Renamed from xg_height_changed.
(x_wm_set_size_hint): Add FRAME_TOOLBAR_WIDTH to base_width.
(xg_update_frame_menubar, free_frame_menubar): Change to
xg_height_or_width_changed.
(xg_tool_bar_detach_callback): Update left/right/top/bottom tool bar
size correctly. Remove hardcoded 4, instead use handlebox size -
toolbar size.
(xg_tool_bar_attach_callback): Update left/right/top/bottom tool bar
size correctly. Use handlebox size + toolbar size as additional
size.
(xg_pack_tool_bar): POS is a new parameter.
Set orientation of tool bar based on pos.
Only make handlebox_widget if NULL.
Check if tool bar goes to vbox or hbox depending on pos.
(xg_update_tool_bar_sizes): New function.
(update_frame_tool_bar): Remove old_req, new_req. Do not get tool bar
height, call xg_update_tool_bar_sizes instead.
(free_frame_tool_bar): Remove from hbox or vbox depending on
toolbar_in_hbox, Set all FRAME_TOOLBAR_*_(WIDTH|HEIGHT) to zero.
(xg_change_toolbar_position): New function.
* src/gtkutil.h (xg_change_toolbar_position): Declare.
* src/window.c (calc_absolute_offset): Check for FRAME_TOOLBAR_TOP_HEIGHT
and FRAME_TOOLBAR_LEFT_WIDTH.
* src/xfns.c (x_set_tool_bar_position): New function.
(xic_set_statusarea): Use FRAME_TOOLBAR_TOP_HEIGHT.
(x_frame_parm_handlers): Add x_set_tool_bar_position.
(syms_of_xfns): if USE_GTK, provide move-toolbar.
* src/xterm.c (x_set_window_size_1): Add FRAME_TOOLBAR_WIDTH to pixelwidth.
* src/xterm.h (struct x_output): Add toolbar_top_height,
toolbar_bottom_height, toolbar_left_width, toolbar_right_width. Remove
toolbar_height.
if USE_GTK: Add hbox_widget and toolbar_in_hbox.
(FRAME_TOOLBAR_TOP_HEIGHT, FRAME_TOOLBAR_BOTTOM_HEIGHT)
(FRAME_TOOLBAR_LEFT_WIDTH, FRAME_TOOLBAR_RIGHT_WIDTH): New macros.
(FRAME_TOOLBAR_HEIGHT): Is now TOP_HEIGHT + BOTTOM_HEIGHT.
author | Jan D. <jan.h.d@swipnet.se> |
---|---|
date | Thu, 29 Jul 2010 18:49:59 +0200 |
parents | 1d1d5d9bd884 |
children | 376148b31b5e |
rev | line source |
---|---|
40710 | 1 ;;; lrt.el --- Quail package for inputting Lao characters by LRT method -*-coding: iso-2022-7bit;-*- |
18673 | 2 |
106815 | 3 ;; Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
75253
f5f322eb227f
Update copyright for years from Emacs 21 to present.
Glenn Morris <rgm@gnu.org>
parents:
74605
diff
changeset
|
4 ;; Free Software Foundation, Inc. |
f5f322eb227f
Update copyright for years from Emacs 21 to present.
Glenn Morris <rgm@gnu.org>
parents:
74605
diff
changeset
|
5 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, |
106815 | 6 ;; 2006, 2007, 2008, 2009, 2010 |
67657 | 7 ;; National Institute of Advanced Industrial Science and Technology (AIST) |
8 ;; Registration Number H14PRO021 | |
18673 | 9 |
10 ;; Keywords: multilingual, input method, Lao, LRT. | |
11 | |
12 ;; This file is part of GNU Emacs. | |
13 | |
94710
4f1fd208c354
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79727
diff
changeset
|
14 ;; GNU Emacs is free software: you can redistribute it and/or modify |
18673 | 15 ;; it under the terms of the GNU General Public License as published by |
94710
4f1fd208c354
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79727
diff
changeset
|
16 ;; the Free Software Foundation, either version 3 of the License, or |
4f1fd208c354
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79727
diff
changeset
|
17 ;; (at your option) any later version. |
18673 | 18 |
19 ;; GNU Emacs is distributed in the hope that it will be useful, | |
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
22 ;; GNU General Public License for more details. | |
23 | |
24 ;; You should have received a copy of the GNU General Public License | |
94710
4f1fd208c354
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79727
diff
changeset
|
25 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
18673 | 26 |
38453
519983161a46
Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents:
26881
diff
changeset
|
27 ;;; Commentary: |
519983161a46
Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents:
26881
diff
changeset
|
28 |
18673 | 29 ;;; Code: |
30 | |
31 (require 'quail) | |
32 (require 'lao-util) | |
33 | |
34 ;; LRT (Lao Roman Transcription) input method accepts the following | |
35 ;; key sequence: | |
36 ;; consonant [+ semi-vowel-sign-lo ] + vowel [+ maa-sakod ] [+ tone-mark ] | |
37 | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
38 (defun quail-lao-update-translation (control-flag) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
39 (if (integerp control-flag) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
40 ;; Non-composable character typed. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
41 (setq quail-current-str |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
42 (buffer-substring (overlay-start quail-overlay) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
43 (overlay-end quail-overlay)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
44 unread-command-events |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
45 (string-to-list |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
46 (substring quail-current-key control-flag))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
47 (let ((lao-str (lao-transcribe-roman-to-lao-string quail-current-key))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
48 (if (> (aref lao-str 0) 255) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
49 (setq quail-current-str lao-str) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
50 (or quail-current-str |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
51 (setq quail-current-str quail-current-key))))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
52 control-flag) |
18673 | 53 |
54 | |
55 (quail-define-package | |
19260
2d94069b1e81
Change title string of input method "lao-lrt".
Kenichi Handa <handa@m17n.org>
parents:
18833
diff
changeset
|
56 "lao-lrt" "Lao" "(1E(BR" t |
19373
314fa41f0155
(lrt-vowel-table): Some elements corrected.
Kenichi Handa <handa@m17n.org>
parents:
19260
diff
changeset
|
57 "Lao input method using LRT (Lao Roman Transcription). |
314fa41f0155
(lrt-vowel-table): Some elements corrected.
Kenichi Handa <handa@m17n.org>
parents:
19260
diff
changeset
|
58 `\\' (backslash) + number-key => (1p(B,(1q(B,(1r(B,... LAO DIGIT ZERO, ONE, TWO, ... |
314fa41f0155
(lrt-vowel-table): Some elements corrected.
Kenichi Handa <handa@m17n.org>
parents:
19260
diff
changeset
|
59 `\\' (backslash) + `\\' => (1f(B LAO KO LA (REPETITION) |
314fa41f0155
(lrt-vowel-table): Some elements corrected.
Kenichi Handa <handa@m17n.org>
parents:
19260
diff
changeset
|
60 `\\' (backslash) + `$' => (1O(B LAO ELLIPSIS |
314fa41f0155
(lrt-vowel-table): Some elements corrected.
Kenichi Handa <handa@m17n.org>
parents:
19260
diff
changeset
|
61 " |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
62 nil 'forget-last-selection 'deterministic 'kbd-translate 'show-layout |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
63 nil nil nil 'quail-lao-update-translation nil t) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
64 |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
65 ;; LRT (Lao Roman Transcription) input method accepts the following |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
66 ;; key sequence: |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
67 ;; consonant [ semi-vowel-sign-lo ] vowel [ maa-sakod ] [ tone-mark ] |
18673 | 68 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
69 (quail-install-map |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
70 (quail-map-from-table |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
71 '((base-state (lao-transcription-consonant-alist . sv-state) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
72 lao-transcription-vowel-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
73 lao-transcription-tone-alist) |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
40710
diff
changeset
|
74 (sv-state (lao-transcription-semi-vowel-alist . v-state) |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
75 (lao-transcription-vowel-alist . mt-state)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
76 (v-state (lao-transcription-vowel-alist . mt-state)) |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
40710
diff
changeset
|
77 (mt-state (lao-transcription-maa-sakod-alist . t-state) |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
78 lao-transcription-tone-alist) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
79 (t-state lao-transcription-tone-alist)))) |
19260
2d94069b1e81
Change title string of input method "lao-lrt".
Kenichi Handa <handa@m17n.org>
parents:
18833
diff
changeset
|
80 |
94710
4f1fd208c354
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79727
diff
changeset
|
81 ;; arch-tag: f65e4038-e187-4906-997b-d2de7ed813d2 |
38453
519983161a46
Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents:
26881
diff
changeset
|
82 ;;; lrt.el ends here |