From 8ab086b6cc054501bfbf7ef6fa509c393691e860 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Mon, 18 Sep 2000 16:07:07 +0000 Subject: initial import --- vcl/workben/makefile.mk | 151 ++++++++++++++++++++++++++++++++++++++++++++++ vcl/workben/svdem.cxx | 157 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 308 insertions(+) create mode 100644 vcl/workben/makefile.mk create mode 100644 vcl/workben/svdem.cxx (limited to 'vcl/workben') diff --git a/vcl/workben/makefile.mk b/vcl/workben/makefile.mk new file mode 100644 index 000000000000..a12a98182174 --- /dev/null +++ b/vcl/workben/makefile.mk @@ -0,0 +1,151 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: hr $ $Date: 2000-09-18 17:05:50 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ=.. + +PRJNAME=SV +TARGET=svdem +LIBTARGET=NO + +# --- Settings ----------------------------------------------------- + +.INCLUDE : svpre.mk +.INCLUDE : settings.mk +.INCLUDE : sv.mk + +# --- Files -------------------------------------------------------- + +CXXFILES= svdem.cxx + +OBJFILES= $(OBJ)$/svdem.obj + +APP1NOSAL= TRUE +APP1TARGET= $(TARGET) +APP1OBJS= $(OBJFILES) \ + $(OBJ)$/salmain.obj + +APP1STDLIBS= $(CPPULIB) \ + $(TOOLSLIB) \ + $(SALLIB) \ + $(VOSLIB) \ + $(SOTLIB) \ + $(SVLIB) + +APP1DEPN= $(L)$/itools.lib \ + $(L)$/sot.lib + +.IF "$(GUI)"=="WIN" || "$(GUI)"=="OS2" +APP1DEF= $(MISC)$/$(TARGET).def +.ENDIF + +.IF "$(remote)"!="" +EXCEPTIONSFILES=$(OBJ)$/svdem.obj +.ENDIF + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + +#svdem.cxx: $(I)tools.hxx $(I)svgen.hxx $(I)svwindow.hxx \ +# $(I)sv.hxx + +# ------------------------------------------------------------------ +# Windows +# ------------------------------------------------------------------ + +.IF "$(GUI)" == "WIN" + +$(MISC)$/$(TARGET).def: makefile + echo NAME $(TARGET) >$@ + echo DESCRIPTION 'StarView - Testprogramm' >>$@ + echo EXETYPE WINDOWS >>$@ + echo STUB 'winSTUB.EXE' >>$@ + echo PROTMODE >>$@ + echo CODE PRELOAD MOVEABLE DISCARDABLE >>$@ + echo DATA PRELOAD MOVEABLE MULTIPLE >>$@ + echo HEAPSIZE 8192 >>$@ + echo STACKSIZE 32768 >>$@ + +.ENDIF + +# ------------------------------------------------------------------ +# OS2 +# ------------------------------------------------------------------ + +.IF "$(GUI)" == "OS2" + +$(MISC)$/$(TARGET).def: makefile + echo NAME $(TARGET) WINDOWAPI >$@ + echo DESCRIPTION 'StarView - Testprogramm' >>$@ +.IF "$(COM)" != "BLC" + echo STUB 'os2STUB.EXE' >>$@ +.ENDIF +.IF "$(COM)"!="MTW" + echo EXETYPE OS2 >>$@ +.ENDIF + echo PROTMODE >>$@ + echo CODE LOADONCALL >>$@ + echo DATA PRELOAD MULTIPLE >>$@ + echo HEAPSIZE 16384 >>$@ + echo STACKSIZE 32768 >>$@ + +.ENDIF diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx new file mode 100644 index 000000000000..db5666d21bbb --- /dev/null +++ b/vcl/workben/svdem.cxx @@ -0,0 +1,157 @@ +/************************************************************************* + * + * $RCSfile: svdem.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:05:50 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include +#include +#include +#include + +// ----------------------------------------------------------------------- + +class MyApp : public Application +{ +public: + void Main(); +}; + +MyApp aMyApp; + +// ----------------------------------------------------------------------- + +class MyWin : public WorkWindow +{ +public: + MyWin( Window* pParent, WinBits nWinStyle ); + + void MouseMove( const MouseEvent& rMEvt ); + void MouseButtonDown( const MouseEvent& rMEvt ); + void MouseButtonUp( const MouseEvent& rMEvt ); + void KeyInput( const KeyEvent& rKEvt ); + void KeyUp( const KeyEvent& rKEvt ); + void Paint( const Rectangle& rRect ); + void Resize(); +}; + +// ----------------------------------------------------------------------- + +void MyApp::Main() +{ + MyWin aMainWin( NULL, WB_APP | WB_STDWORK ); + aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "VCL - Workbench" ) ) ); + aMainWin.Show(); + + Execute(); +} + +// ----------------------------------------------------------------------- + +MyWin::MyWin( Window* pParent, WinBits nWinStyle ) : + WorkWindow( pParent, nWinStyle ) +{ +} + +// ----------------------------------------------------------------------- + +void MyWin::MouseMove( const MouseEvent& rMEvt ) +{ + WorkWindow::MouseMove( rMEvt ); +} + +// ----------------------------------------------------------------------- + +void MyWin::MouseButtonDown( const MouseEvent& rMEvt ) +{ + WorkWindow::MouseButtonDown( rMEvt ); +} + +// ----------------------------------------------------------------------- + +void MyWin::MouseButtonUp( const MouseEvent& rMEvt ) +{ + WorkWindow::MouseButtonUp( rMEvt ); +} + +// ----------------------------------------------------------------------- + +void MyWin::KeyInput( const KeyEvent& rKEvt ) +{ + WorkWindow::KeyInput( rKEvt ); +} + +// ----------------------------------------------------------------------- + +void MyWin::KeyUp( const KeyEvent& rKEvt ) +{ + WorkWindow::KeyUp( rKEvt ); +} + +// ----------------------------------------------------------------------- + +void MyWin::Paint( const Rectangle& rRect ) +{ + WorkWindow::Paint( rRect ); +} + +// ----------------------------------------------------------------------- + +void MyWin::Resize() +{ + WorkWindow::Resize(); +} -- cgit v1.2.3