… | |
… | |
11 | * Copyright (c) 1997 mj olesen <olesen@me.QueensU.CA> |
11 | * Copyright (c) 1997 mj olesen <olesen@me.QueensU.CA> |
12 | * - extensive modifications |
12 | * - extensive modifications |
13 | * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de> |
13 | * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de> |
14 | * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> |
14 | * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> |
15 | * - extensive modifications |
15 | * - extensive modifications |
|
|
16 | * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com> |
16 | * |
17 | * |
17 | * This program is free software; you can redistribute it and/or modify |
18 | * This program is free software; you can redistribute it and/or modify |
18 | * it under the terms of the GNU General Public License as published by |
19 | * it under the terms of the GNU General Public License as published by |
19 | * the Free Software Foundation; either version 2 of the License, or |
20 | * the Free Software Foundation; either version 2 of the License, or |
20 | * (at your option) any later version. |
21 | * (at your option) any later version. |
… | |
… | |
79 | vt_ev (this, &rxvt_term::x_cb), |
80 | vt_ev (this, &rxvt_term::x_cb), |
80 | #ifdef HAVE_SCROLLBARS |
81 | #ifdef HAVE_SCROLLBARS |
81 | scrollbar_ev (this, &rxvt_term::x_cb), |
82 | scrollbar_ev (this, &rxvt_term::x_cb), |
82 | #endif |
83 | #endif |
83 | #ifdef MENUBAR |
84 | #ifdef MENUBAR |
84 | menubar_ev (this, &rxvt_term::x_cb), fixme |
85 | menubar_ev (this, &rxvt_term::x_cb), |
85 | #endif |
86 | #endif |
86 | #ifdef CURSOR_BLINK |
87 | #ifdef CURSOR_BLINK |
87 | cursor_blink_ev (this, &rxvt_term::cursor_blink_cb), |
88 | cursor_blink_ev (this, &rxvt_term::cursor_blink_cb), |
88 | #endif |
89 | #endif |
89 | #ifdef TEXT_BLINK |
90 | #ifdef TEXT_BLINK |
… | |
… | |
261 | create_windows (argc, argv); |
262 | create_windows (argc, argv); |
262 | |
263 | |
263 | init_xlocale (); |
264 | init_xlocale (); |
264 | |
265 | |
265 | scr_reset (); /* initialize screen */ |
266 | scr_reset (); /* initialize screen */ |
266 | #ifdef RXVT_GRAPHICS |
|
|
267 | Gr_reset (); /* reset graphics */ |
|
|
268 | #endif |
|
|
269 | |
267 | |
270 | #if 0 |
268 | #if 0 |
271 | XSynchronize (display->display, True); |
269 | XSynchronize (display->display, True); |
272 | #endif |
270 | #endif |
273 | |
271 | |
274 | #ifdef HAVE_SCROLLBARS |
272 | #ifdef HAVE_SCROLLBARS |
275 | if (Options & Opt_scrollBar) |
273 | if (Options & Opt_scrollBar) |
276 | resize_scrollbar (); /* create and map scrollbar */ |
274 | resize_scrollbar (); /* create and map scrollbar */ |
277 | #endif |
275 | #endif |
278 | #if (MENUBAR_MAX) |
276 | #if (MENUBAR_MAX) |
279 | if (menubar_visible (r)) |
277 | if (menubar_visible ()) |
280 | XMapWindow (display->display, menuBar.win); |
278 | XMapWindow (display->display, menuBar.win); |
281 | #endif |
279 | #endif |
282 | #ifdef TRANSPARENT |
280 | #ifdef TRANSPARENT |
283 | if (Options & Opt_transparent) |
281 | if (Options & Opt_transparent) |
284 | { |
282 | { |
… | |
… | |
717 | * init = 1 - initialize |
715 | * init = 1 - initialize |
718 | * |
716 | * |
719 | * fontname == FONT_UP - switch to bigger font |
717 | * fontname == FONT_UP - switch to bigger font |
720 | * fontname == FONT_DN - switch to smaller font |
718 | * fontname == FONT_DN - switch to smaller font |
721 | */ |
719 | */ |
722 | void |
720 | bool |
723 | rxvt_term::change_font (int init, const char *fontname) |
721 | rxvt_term::change_font (const char *fontname) |
724 | {} |
722 | { |
|
|
723 | if (fontname == FONT_UP) |
|
|
724 | { |
|
|
725 | // TODO |
|
|
726 | } |
|
|
727 | else if (fontname == FONT_DN) |
|
|
728 | { |
|
|
729 | // TODO |
|
|
730 | } |
|
|
731 | else |
|
|
732 | { |
|
|
733 | rxvt_fontset *fs = new rxvt_fontset (this); |
725 | |
734 | |
726 | void |
735 | if (fs && fs->populate (fontname)) |
|
|
736 | { |
|
|
737 | delete TermWin.fontset; |
|
|
738 | TermWin.fontset = fs; |
|
|
739 | TermWin.fwidth = fs->base_font ()->width; |
|
|
740 | TermWin.fheight = fs->base_font ()->height; |
|
|
741 | TermWin.fbase = fs->base_font ()->ascent; |
|
|
742 | |
|
|
743 | // TODO: screen needs to be told about new fonts |
|
|
744 | |
|
|
745 | if (TermWin.parent[0]) |
|
|
746 | { |
|
|
747 | resize_all_windows (0, 0, 0); |
|
|
748 | scr_remap_chars (); |
|
|
749 | scr_touch (true); |
|
|
750 | } |
|
|
751 | |
|
|
752 | return true; |
|
|
753 | } |
|
|
754 | } |
|
|
755 | |
|
|
756 | return false; |
|
|
757 | } |
|
|
758 | |
|
|
759 | bool |
727 | rxvt_term::font_up_down (int n, int direction) |
760 | rxvt_term::font_up_down (int n, int direction) |
728 | {} |
761 | { |
|
|
762 | return false; |
|
|
763 | } |
729 | |
764 | |
730 | /*----------------------------------------------------------------------*/ |
765 | /*----------------------------------------------------------------------*/ |
731 | /*----------------------------------------------------------------------*/ |
766 | /*----------------------------------------------------------------------*/ |
732 | /* xterm sequences - title, iconName, color (exptl) */ |
767 | /* xterm sequences - title, iconName, color (exptl) */ |
733 | void |
768 | void |
… | |
… | |
994 | 0, TermWin_TotalWidth (), menuBar_TotalHeight ()); |
1029 | 0, TermWin_TotalWidth (), menuBar_TotalHeight ()); |
995 | |
1030 | |
996 | XMoveResizeWindow (display->display, TermWin.vt, window_vt_x, |
1031 | XMoveResizeWindow (display->display, TermWin.vt, window_vt_x, |
997 | window_vt_y, TermWin_TotalWidth (), |
1032 | window_vt_y, TermWin_TotalWidth (), |
998 | TermWin_TotalHeight ()); |
1033 | TermWin_TotalHeight ()); |
999 | #ifdef RXVT_GRAPHICS |
|
|
1000 | if (old_height) |
|
|
1001 | Gr_Resize (old_width - szHint.base_width, |
|
|
1002 | old_height - szHint.base_height); |
|
|
1003 | #endif |
|
|
1004 | scr_clear (); |
1034 | scr_clear (); |
1005 | #ifdef XPM_BACKGROUND |
1035 | #ifdef XPM_BACKGROUND |
1006 | resize_pixmap (); |
1036 | resize_pixmap (); |
1007 | #endif |
1037 | #endif |
1008 | |
1038 | |