… | |
… | |
80 | vt_ev (this, &rxvt_term::x_cb), |
80 | vt_ev (this, &rxvt_term::x_cb), |
81 | #ifdef HAVE_SCROLLBARS |
81 | #ifdef HAVE_SCROLLBARS |
82 | scrollbar_ev (this, &rxvt_term::x_cb), |
82 | scrollbar_ev (this, &rxvt_term::x_cb), |
83 | #endif |
83 | #endif |
84 | #ifdef MENUBAR |
84 | #ifdef MENUBAR |
85 | menubar_ev (this, &rxvt_term::x_cb), fixme |
85 | menubar_ev (this, &rxvt_term::x_cb), |
86 | #endif |
86 | #endif |
87 | #ifdef CURSOR_BLINK |
87 | #ifdef CURSOR_BLINK |
88 | cursor_blink_ev (this, &rxvt_term::cursor_blink_cb), |
88 | cursor_blink_ev (this, &rxvt_term::cursor_blink_cb), |
89 | #endif |
89 | #endif |
90 | #ifdef TEXT_BLINK |
90 | #ifdef TEXT_BLINK |
… | |
… | |
117 | #endif |
117 | #endif |
118 | |
118 | |
119 | delete TermWin.fontset; |
119 | delete TermWin.fontset; |
120 | |
120 | |
121 | if (display) |
121 | if (display) |
|
|
122 | { |
122 | if (TermWin.parent[0]) |
123 | if (TermWin.parent[0]) |
123 | XDestroyWindow (display->display, TermWin.parent[0]); |
124 | XDestroyWindow (display->display, TermWin.parent[0]); |
|
|
125 | #if defined(MENUBAR) && (MENUBAR_MAX > 1) |
|
|
126 | if (menuBar.win) |
|
|
127 | XDestroyWindow (display->display, menuBar.win); |
|
|
128 | delete menuBar.drawable; |
|
|
129 | #endif |
|
|
130 | } |
124 | |
131 | |
125 | // TODO: free pixcolours, colours should become part of rxvt_display |
132 | // TODO: free pixcolours, colours should become part of rxvt_display |
126 | |
133 | |
127 | delete PixColors; |
134 | delete PixColors; |
128 | |
135 | |
… | |
… | |
249 | |
256 | |
250 | const char **cmd_argv = init_resources (argc, argv); |
257 | const char **cmd_argv = init_resources (argc, argv); |
251 | |
258 | |
252 | set_locale (""); |
259 | set_locale (""); |
253 | |
260 | |
254 | #if (MENUBAR_MAX) |
261 | #if MENUBAR_MAX |
255 | menubar_read (rs[Rs_menu]); |
262 | menubar_read (rs[Rs_menu]); |
256 | #endif |
263 | #endif |
257 | #ifdef HAVE_SCROLLBARS |
264 | #ifdef HAVE_SCROLLBARS |
258 | if (Options & Opt_scrollBar) |
265 | if (Options & Opt_scrollBar) |
259 | scrollBar.setIdle (); /* set existence for size calculations */ |
266 | scrollBar.setIdle (); /* set existence for size calculations */ |
… | |
… | |
272 | #ifdef HAVE_SCROLLBARS |
279 | #ifdef HAVE_SCROLLBARS |
273 | if (Options & Opt_scrollBar) |
280 | if (Options & Opt_scrollBar) |
274 | resize_scrollbar (); /* create and map scrollbar */ |
281 | resize_scrollbar (); /* create and map scrollbar */ |
275 | #endif |
282 | #endif |
276 | #if (MENUBAR_MAX) |
283 | #if (MENUBAR_MAX) |
277 | if (menubar_visible (r)) |
284 | if (menubar_visible ()) |
278 | XMapWindow (display->display, menuBar.win); |
285 | XMapWindow (display->display, menuBar.win); |
279 | #endif |
286 | #endif |
280 | #ifdef TRANSPARENT |
287 | #ifdef TRANSPARENT |
281 | if (Options & Opt_transparent) |
288 | if (Options & Opt_transparent) |
282 | { |
289 | { |
… | |
… | |
715 | * init = 1 - initialize |
722 | * init = 1 - initialize |
716 | * |
723 | * |
717 | * fontname == FONT_UP - switch to bigger font |
724 | * fontname == FONT_UP - switch to bigger font |
718 | * fontname == FONT_DN - switch to smaller font |
725 | * fontname == FONT_DN - switch to smaller font |
719 | */ |
726 | */ |
720 | void |
727 | bool |
721 | rxvt_term::change_font (int init, const char *fontname) |
728 | rxvt_term::change_font (const char *fontname) |
722 | {} |
729 | { |
|
|
730 | if (fontname == FONT_UP) |
|
|
731 | { |
|
|
732 | // TODO |
|
|
733 | } |
|
|
734 | else if (fontname == FONT_DN) |
|
|
735 | { |
|
|
736 | // TODO |
|
|
737 | } |
|
|
738 | else |
|
|
739 | { |
|
|
740 | rxvt_fontset *fs = new rxvt_fontset (this); |
723 | |
741 | |
724 | void |
742 | if (fs && fs->populate (fontname)) |
|
|
743 | { |
|
|
744 | delete TermWin.fontset; |
|
|
745 | TermWin.fontset = fs; |
|
|
746 | TermWin.fwidth = fs->base_font ()->width; |
|
|
747 | TermWin.fheight = fs->base_font ()->height; |
|
|
748 | TermWin.fbase = fs->base_font ()->ascent; |
|
|
749 | |
|
|
750 | // TODO: screen needs to be told about new fonts |
|
|
751 | |
|
|
752 | if (TermWin.parent[0]) |
|
|
753 | { |
|
|
754 | resize_all_windows (0, 0, 0); |
|
|
755 | scr_remap_chars (); |
|
|
756 | scr_touch (true); |
|
|
757 | } |
|
|
758 | |
|
|
759 | return true; |
|
|
760 | } |
|
|
761 | } |
|
|
762 | |
|
|
763 | return false; |
|
|
764 | } |
|
|
765 | |
|
|
766 | bool |
725 | rxvt_term::font_up_down (int n, int direction) |
767 | rxvt_term::font_up_down (int n, int direction) |
726 | {} |
768 | { |
|
|
769 | return false; |
|
|
770 | } |
727 | |
771 | |
728 | /*----------------------------------------------------------------------*/ |
772 | /*----------------------------------------------------------------------*/ |
729 | /*----------------------------------------------------------------------*/ |
773 | /*----------------------------------------------------------------------*/ |
730 | /* xterm sequences - title, iconName, color (exptl) */ |
774 | /* xterm sequences - title, iconName, color (exptl) */ |
731 | void |
775 | void |