diff --git a/src/sbbs3/ctrl/PreviewFormUnit.cpp b/src/sbbs3/ctrl/PreviewFormUnit.cpp index 5228d70ddd089cbfa92cf7a33a71b9817b0a8dc8..60e6276c3047f749b7745c90312233baca04cd12 100644 --- a/src/sbbs3/ctrl/PreviewFormUnit.cpp +++ b/src/sbbs3/ctrl/PreviewFormUnit.cpp @@ -1,3 +1,36 @@ +/* $Id$ */ + +/**************************************************************************** + * @format.tab-size 4 (Plain Text/Source Code File Header) * + * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * + * * + * Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * See the GNU General Public License for more details: gpl.txt or * + * http://www.fsf.org/copyleft/gpl.html * + * * + * Anonymous FTP access to the most recent released source is available at * + * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net * + * * + * Anonymous CVS access to the development source and modification history * + * is available at cvs.synchro.net:/cvsroot/sbbs, example: * + * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login * + * (just hit return, no password is necessary) * + * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src * + * * + * For Synchronet coding style and modification guidelines, see * + * http://www.synchro.net/source.html * + * * + * You are encouraged to submit any modifications (preferably in Unix diff * + * format) via e-mail to mods@synchro.net * + * * + * Note: If this box doesn't appear square, then you need to fix your tabs. * + ****************************************************************************/ + //--------------------------------------------------------------------------- #include <vcl.h> @@ -29,6 +62,7 @@ __fastcall TPreviewForm::~TPreviewForm() delete Terminal; } + #define ANSI_ESC "\x1b[" //--------------------------------------------------------------------------- @@ -160,4 +194,16 @@ void __fastcall TPreviewForm::FormClose(TObject *Sender, } //--------------------------------------------------------------------------- +void __fastcall TPreviewForm::ChangeFontMenuItemClick(TObject *Sender) +{ + TFontDialog *FontDialog=new TFontDialog(this); + + FontDialog->Font=MainForm->SpyTerminalFont; + FontDialog->Execute(); + MainForm->SpyTerminalFont->Assign(FontDialog->Font); + Terminal->Font=MainForm->SpyTerminalFont; + delete FontDialog; + Terminal->UpdateScreen(); +} +//--------------------------------------------------------------------------- diff --git a/src/sbbs3/ctrl/PreviewFormUnit.dfm b/src/sbbs3/ctrl/PreviewFormUnit.dfm index 6bae1d29cfc52ceffa974c0974f1b81fa5407868..4cba9c6b5d641b1008b9590b605c034a3b1b6687 100644 --- a/src/sbbs3/ctrl/PreviewFormUnit.dfm +++ b/src/sbbs3/ctrl/PreviewFormUnit.dfm @@ -1,19 +1,29 @@ object PreviewForm: TPreviewForm - Left = 392 - Top = 374 - Width = 622 - Height = 309 + Left = 504 + Top = 375 + Width = 585 + Height = 364 Caption = 'Preview' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText - Font.Height = -11 + Font.Height = -14 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False - Position = poDefault + PopupMenu = PopupMenu + Position = poDefaultPosOnly OnClose = FormClose OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 + PixelsPerInch = 120 + TextHeight = 16 + object PopupMenu: TPopupMenu + Left = 144 + Top = 24 + object ChangeFontMenuItem: TMenuItem + Caption = 'Change Font' + Hint = 'Change Font' + OnClick = ChangeFontMenuItemClick + end + end end diff --git a/src/sbbs3/ctrl/PreviewFormUnit.h b/src/sbbs3/ctrl/PreviewFormUnit.h index d5c1114bb9e4fe1aacb70db02b1fbdaf807ca909..cbf6a47b73a610ada2ef5c89d937dd8c6cea720f 100644 --- a/src/sbbs3/ctrl/PreviewFormUnit.h +++ b/src/sbbs3/ctrl/PreviewFormUnit.h @@ -1,3 +1,36 @@ +/* $Id$ */ + +/**************************************************************************** + * @format.tab-size 4 (Plain Text/Source Code File Header) * + * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * + * * + * Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * See the GNU General Public License for more details: gpl.txt or * + * http://www.fsf.org/copyleft/gpl.html * + * * + * Anonymous FTP access to the most recent released source is available at * + * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net * + * * + * Anonymous CVS access to the development source and modification history * + * is available at cvs.synchro.net:/cvsroot/sbbs, example: * + * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login * + * (just hit return, no password is necessary) * + * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src * + * * + * For Synchronet coding style and modification guidelines, see * + * http://www.synchro.net/source.html * + * * + * You are encouraged to submit any modifications (preferably in Unix diff * + * format) via e-mail to mods@synchro.net * + * * + * Note: If this box doesn't appear square, then you need to fix your tabs. * + ****************************************************************************/ + //--------------------------------------------------------------------------- #ifndef PreviewFormUnitH @@ -7,13 +40,17 @@ #include <Controls.hpp> #include <StdCtrls.hpp> #include <Forms.hpp> -#include "emulvt.hpp" /* TEmulVT */ +#include "emulvt.hpp" /* TEmulVT */ +#include <Menus.hpp> //--------------------------------------------------------------------------- class TPreviewForm : public TForm { __published: // IDE-managed Components + TPopupMenu *PopupMenu; + TMenuItem *ChangeFontMenuItem; void __fastcall FormShow(TObject *Sender); void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall ChangeFontMenuItemClick(TObject *Sender); private: // User declarations public: // User declarations __fastcall TPreviewForm(TComponent* Owner);