00001 // $Id$ 00002 00003 //********************************************************************** 00004 // * 00005 // Description: TurboVision window to be used as a 'layout form'. * 00006 // * 00007 // Author: Chris White (whitecf@bcs.org.uk) * 00008 // * 00009 // Copyright (C) 2003 Monitor Computing Services Ltd. * 00010 // * 00011 // This program is free software; you can redistribute it and/or * 00012 // modify it under the terms of the GNU General Public License * 00013 // as published by the Free Software Foundation; either version 2 * 00014 // of the License, or any later version. * 00015 // * 00016 // This program is distributed in the hope that it will be useful, * 00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of * 00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00019 // GNU General Public License for more details. * 00020 // * 00021 // You should have received a copy of the GNU General Public * 00022 // License (http://www.gnu.org/copyleft/gpl.html) along with this * 00023 // program; if not, write to: * 00024 // The Free Software Foundation Inc., * 00025 // 59 Temple Place - Suite 330, * 00026 // Boston, MA 02111-1307, * 00027 // USA. * 00028 // * 00029 //********************************************************************** 00030 // * 00031 // Notes: * 00032 // * 00033 //********************************************************************** 00034 00035 #define Uses_TBackground 00036 00037 #include <mytrace.h> 00038 00039 #include "form.h" 00040 00041 00042 using namespace Monitor::Utility; 00043 00044 00045 00046 Form::Form(const TRect& newBounds) : 00047 TGroup(newBounds) 00048 { 00049 _USEMYTRACE_("Form::Form") 00050 00051 options |= ofFirstClick; 00052 00053 // Create a blank background on which everything else can be 'drawn'. 00054 insert(new TBackground(getExtent(), ' ')); 00055 } 00056 00057 00058 00059 void 00060 Form::changeBounds(const TRect& newBounds) 00061 { 00062 _USEMYTRACE_("Form::changeBounds") 00063 00064 TGroup::changeBounds(newBounds); 00065 00066 TBackground *myBackground = dynamic_cast< TBackground* >(first()); 00067 00068 if (0 != myBackground) 00069 { 00070 myBackground->changeBounds(getExtent()); 00071 } 00072 } 00073
1.2.14 written by Dimitri van Heesch,
© 1997-2002