Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

FXPlot2DDialog.h

00001 /*******************************************************************************
00002 * Copyright (C) 2003-2005 by Rafael de Pelegrini Soares.   All Rights Reserved.
00003 ********************************************************************************
00004 * This library is free software; you can redistribute it and/or
00005 * modify it under the terms of the GNU Lesser General Public
00006 * License as published by the Free Software Foundation; either
00007 * version 2.1 of the License, or (at your option) any later version.
00008 *
00009 * This library is distributed in the hope that it will be useful,
00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00012 * Lesser General Public License for more details.
00013 *
00014 * You should have received a copy of the GNU Lesser General Public
00015 * License along with this library; if not, write to the Free Software
00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
00017 ********************************************************************************
00018 * $Id: FXPlot2DDialog.h,v 1.1.1.1 2005/07/29 17:00:00 rpseng Exp $
00019 ********************************************************************************/
00020  
00021 #ifndef __FXPLOT2DDIAG_H
00022 #define __FXPLOT2DDIAG_H
00023 
00024 #include "FXPlot2D.h"
00025 
00026 #include <vector>
00027 
00029 struct FXCurveRecord {
00031         FXbool operator == (const FXCurve *c) const;
00033         void load(const FXCurve *c);
00035         void save(FXCurve *c) const;
00036 
00038         FXString label;
00040         FXint style;
00042         FXPlotPen pen;
00044         FXint markStyle;
00046         FXint markSize;
00048         FXColor markColor;
00049 };
00050 
00051 
00055 class FXPlot2DDiag : public FXDialogBox
00056 {
00057         FXDECLARE(FXPlot2DDiag)
00058 protected:
00059         // FOX protected constructor.
00060         FXPlot2DDiag(){};
00061         
00063         FXList* curves;
00065         FXPlot2D *plot;
00067         FXCurve *cur;
00068 
00070         FXCurveRecord rec;
00072         FXDataTarget label;
00074         FXDataTarget style;
00076         FXDataTarget lineWidth;
00078         FXDataTarget lineStyle;
00080         FXDataTarget lineColor;
00082         FXDataTarget markStyle;
00084         FXDataTarget markColor;
00086         FXDataTarget markSize;
00087 
00089         FXButton* apply;
00091         FXButton* remove;
00092 
00093 public:
00095         FXPlot2DDiag(FXPlot2D *view);
00097         virtual ~FXPlot2DDiag();
00098 
00100         FXuint execute(FXuint placement=PLACEMENT_CURSOR);
00101 
00102         // FOX call backs
00103         long onChanged(FXObject *obj,FXSelector sel,void* ptr);
00104         long onApply(FXObject *obj,FXSelector sel,void* ptr);
00105         long onCmdClose(FXObject *obj,FXSelector sel,void* ptr);
00106         long onCurveChanged(FXObject *obj,FXSelector sel,void* ptr);
00107         long onCmdDeleteCurve(FXObject *obj,FXSelector sel,void* ptr);
00108 
00109         // FOX commands
00110         enum Commands {
00111                 ID_CLOSE = FXDialogBox::ID_LAST,
00112                 ID_APPLY,
00113                 ID_DELETE,
00114                 ID_SEL_CURVE,
00115                 ID_CONTROLS,
00116                 ID_LAST,
00117         };
00118 };
00119 
00120 
00121 #endif // __FXPLOT2DDIAG_H
00122 
00123 
00124 

Generated on Tue Jan 31 10:55:30 2006 for FXPlot by  doxygen 1.4.4