]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wxGenericValidator & doc
authorJulian Smart <julian@anthemion.co.uk>
Sun, 7 Feb 1999 17:11:44 +0000 (17:11 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 7 Feb 1999 17:11:44 +0000 (17:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

25 files changed:
docs/latex/wx/category.tex
docs/latex/wx/classes.tex
docs/latex/wx/strmsock.tex
docs/latex/wx/valgen.tex [new file with mode: 0644]
docs/latex/wx/valtext.tex
include/wx/msw/ole/automtn.h
include/wx/valgen.h [new file with mode: 0644]
src/common/valgen.cpp [new file with mode: 0644]
src/gtk.inc
src/motif.inc
src/motif/makefile.unx
src/msw/makefile.b32
src/msw/makefile.bcc
src/msw/makefile.dos
src/msw/makefile.g95
src/msw/makefile.sc
src/msw/makefile.sl
src/msw/makefile.twn
src/msw/makefile.vc
src/msw/makefile.wat
src/stubs.inc
src/stubs/makefile.unx
src/stubs/makefile.vc
utils/glcanvas/win/glcanvas.cpp
utils/glcanvas/win/glcanvas.h

index 6f608b347754d573421bfbfe712e3d6dd007bbeb..e932b2072ee9732cc025408c89efe207faa5ef94 100644 (file)
@@ -143,7 +143,7 @@ These classes are related to drawing on device contexts and windows.
 \twocolitem{\helpref{wxFont}{wxfont}}{Represents fonts}
 \twocolitem{\helpref{wxFontList}{wxfontlist}}{The list of previously-created fonts}
 \twocolitem{\helpref{wxIcon}{wxicon}}{A small, transparent bitmap for assigning to frames and drawing on device contexts}
-\twocolitem{\helpref{wxImage}{wximage}}{A platform-independent image class.}
+\twocolitem{\helpref{wxImage}{wximage}}{A platform-independent image class}
 \twocolitem{\helpref{wxImageList}{wximagelist}}{A list of images, used with some controls}
 \twocolitem{\helpref{wxMask}{wxmask}}{Represents a mask to be used with a bitmap for transparent drawing}
 \twocolitem{\helpref{wxPen}{wxpen}}{Used for drawing lines on a device context}
@@ -196,8 +196,9 @@ These are the window validators, used for filtering and validating
 user input.
 
 \begin{twocollist}\itemsep=0pt
-\twocolitem{\helpref{wxValidator}{wxvalidator}}{Base validator class.}
-\twocolitem{\helpref{wxTextValidator}{wxtextvalidator}}{Text control validator class.}
+\twocolitem{\helpref{wxValidator}{wxvalidator}}{Base validator class}
+\twocolitem{\helpref{wxTextValidator}{wxtextvalidator}}{Text control validator class}
+\twocolitem{\helpref{wxGenericValidator}{wxgenericvalidator}}{Generic control validator class}
 \end{twocollist}
 
 {\large {\bf Data structures}}
@@ -222,7 +223,7 @@ These are the data structure classes supported by wxWindows.
 \twocolitem{\helpref{wxSize}{wxsize}}{Representation of a size}
 \twocolitem{\helpref{wxTime}{wxtime}}{A class for time manipulation}
 \twocolitem{\helpref{wxVariant}{wxvariant}}{A class for storing arbitrary types
-that may change at run-time.}
+that may change at run-time}
 \end{twocollist}
 
 {\large {\bf Run-time class information system}}
index 122ab151f610f34b535fc1f3c0357e4a3124b135..9a8849310352764666c5302f90b5fb7eb8ee7f01 100644 (file)
@@ -100,6 +100,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$
 \input ftp.tex
 \input gauge.tex
 \input gdiobj.tex
+\input valgen.tex
 \input grid.tex
 \input hash.tex
 \input helpinst.tex
index 08a6e8157e9ecd2e01814b9ebce46b046e52fb54..e49fd767f9398beb3c575561f2f1a1252d4e4936 100644 (file)
@@ -1,7 +1,7 @@
 % -----------------------------------------------------------------------------
 % wxSocketInputStream
 % -----------------------------------------------------------------------------
-\section{\class{wxSocketInputStream}}
+\section{\class{wxSocketInputStream}}\label{wxsocketinputstream}
 
 \wxheading{Derived from}
 
@@ -23,7 +23,7 @@ socket connection.
 % -----------------------------------------------------------------------------
 % wxSocketOutputStream
 % -----------------------------------------------------------------------------
-\section{\class{wxSocketInputStream}}
+\section{\class{wxSocketOutputStream}}\label{wxsocketoutputstream}
 
 \wxheading{Derived from}
 
diff --git a/docs/latex/wx/valgen.tex b/docs/latex/wx/valgen.tex
new file mode 100644 (file)
index 0000000..cabaeff
--- /dev/null
@@ -0,0 +1,81 @@
+\section{\class{wxGenericValidator}}\label{wxgenericvalidator}
+
+wxGenericValidator performs data transfer (but not validation or filtering) for the following
+basic controls: wxButton, wxCheckBox, wxListBox, wxStaticText, wxRadioButton, wxRadioBox,
+wxChoice, wxComboBox, wxGauge, wxSlider, wxScrollBar, wxSpinButton, wxTextCtrl, wxCheckListBox.
+
+It checks the type of the window and uses an appropriate type for that window. For example,
+wxButton and wxTextCtrl transfer data to and from a wxString variable; wxListBox uses a
+wxArrayInt; wxCheckBox uses a bool.
+
+For more information, please see \helpref{Validator overview}{validatoroverview}.
+
+\wxheading{Derived from}
+
+\helpref{wxValidator}{wxvalidator}\\
+\helpref{wxEvtHandler}{wxevthandler}\\
+\helpref{wxObject}{wxobject}
+
+\wxheading{See also}
+
+\helpref{Validator overview}{validatoroverview}, \helpref{wxValidator}{wxvalidator}, 
+\helpref{wxTextValidator}{wxTextvalidator}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxGenericValidator::wxGenericValidator}\label{wxgenericvalidatorconstr}
+
+\func{}{wxGenericValidator}{\param{const wxGenericValidator\&}{ validator}}
+
+Copy constructor.
+
+\func{}{wxGenericValidator}{\param{bool*}{ valPtr}}
+
+Constructor taking a bool pointer. This will be used for wxCheckBox and wxRadioButton.
+
+\func{}{wxGenericValidator}{\param{wxString*}{ valPtr}}
+
+Constructor taking a wxString pointer. This will be used for wxButton, wxComboBox, wxStaticText,
+wxTextCtrl.
+
+\func{}{wxGenericValidator}{\param{int*}{ valPtr}}
+
+Constructor taking an integer pointer. This will be used for wxGauge, wxScrollBar, wxRadioBox, wxSpinButton,
+wxChoice.
+
+\func{}{wxGenericValidator}{\param{wxArrayInt*}{ valPtr}}
+
+Constructor taking a wxArrayInt pointer. This will be used for wxListBox, wxCheckListBox.
+
+\wxheading{Parameters}
+
+\docparam{validator}{Validator to copy.}
+
+\docparam{valPtr}{A pointer to a variable that contains the value. This variable
+should have a lifetime equal to or longer than the validator lifetime (which is usually
+determined by the lifetime of the window).}
+
+\membersection{wxGenericValidator::\destruct{wxGenericValidator}}
+
+\func{}{\destruct{wxGenericValidator}}{\void}
+
+Destructor.
+
+\membersection{wxGenericValidator::Clone}\label{wxgenericvalidatorclone}
+
+\constfunc{virtual wxValidator*}{Clone}{\void}
+
+Clones the generic validator using the copy constructor.
+
+\membersection{wxGenericValidator::TransferFromWindow}\label{wxgenericvalidatortransferfromwindow}
+
+\func{virtual bool}{TransferToWindow}{\param{wxWindow*}{ parent}}
+
+Transfers the value to the window.
+
+\membersection{wxGenericValidator::TransferToWindow}\label{wxgenericvalidatortransfertowindow}
+
+\func{virtual bool}{TransferToWindow}{\param{wxWindow*}{ parent}}
+
+Transfers the window value to the appropriate data type.
+
index 9c7941cb2b715d37c7e568907ab89977c70b55e7..f466e3abd6d2f2d6524e06c1d32aacb1a2811232 100644 (file)
@@ -12,7 +12,8 @@ For more information, please see \helpref{Validator overview}{validatoroverview}
 
 \wxheading{See also}
 
-\helpref{Validator overview}{validatoroverview}, \helpref{wxValidator}{wxvalidator}
+\helpref{Validator overview}{validatoroverview}, \helpref{wxValidator}{wxvalidator}, 
+\helpref{wxGenericValidator}{wxgenericvalidator}
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 
@@ -57,7 +58,7 @@ Destructor.
 
 \membersection{wxTextValidator::Clone}\label{wxtextvalidatorclone}
 
-\constfunc{virtual wxTextValidator*}{Clone}{\void}
+\constfunc{virtual wxValidator*}{Clone}{\void}
 
 Clones the text validator using the copy constructor.
 
index b3598a59858093bccdf0a6d3802ef216a9396059..9e35455a5433de2f683e08d1612ac7d7f37148e5 100644 (file)
 typedef void            WXIDISPATCH;
 typedef unsigned short* WXBSTR;
 
+#ifdef GetObject
+#undef GetObject
+#endif
+
 /*
  * wxAutomationObject
  * Wraps up an IDispatch pointer and invocation; does variant conversion.
diff --git a/include/wx/valgen.h b/include/wx/valgen.h
new file mode 100644 (file)
index 0000000..88e9b88
--- /dev/null
@@ -0,0 +1,58 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        valgen.h
+// Purpose:     wxGenericValidator class
+// Author:      Kevin Smith
+// Modified by:
+// Created:     Jan 22 1999
+// RCS-ID:      
+// Copyright:   (c) 1999 Kevin Smith
+// Licence:    wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_VALGENH__
+#define _WX_VALGENH__
+
+#ifdef __GNUG__
+#pragma interface "valgen.h"
+#endif
+
+#include "wx/validate.h"
+
+class WXDLLEXPORT wxGenericValidator: public wxValidator
+{
+public:
+  wxGenericValidator(bool* val);
+  wxGenericValidator(int* val);
+  wxGenericValidator(wxString* val);
+  wxGenericValidator(wxArrayInt* val);
+  wxGenericValidator(const wxGenericValidator& copyFrom);
+
+  ~wxGenericValidator();
+
+  // Make a clone of this validator (or return NULL) - currently necessary
+  // if you're passing a reference to a validator.
+  // Another possibility is to always pass a pointer to a new validator
+  // (so the calling code can use a copy constructor of the relevant class).
+  virtual wxValidator *Clone(void) const { return new wxGenericValidator(*this); }
+  bool Copy(const wxGenericValidator& val);
+
+  // Called when the value in the window must be validated.
+  // This function can pop up an error message.
+  virtual bool Validate(wxWindow *parent)      {return true;}
+
+  // Called to transfer data to the window
+  virtual bool TransferToWindow(void);
+
+  // Called to transfer data to the window
+  virtual bool TransferFromWindow(void);
+
+protected:
+  void Initialize();
+
+  bool*       m_pBool;
+  int*        m_pInt;
+  wxString*   m_pString;
+  wxArrayInt* m_pArrayInt;
+};
+
+#endif // _WX_VALGENH__
diff --git a/src/common/valgen.cpp b/src/common/valgen.cpp
new file mode 100644 (file)
index 0000000..d90f90f
--- /dev/null
@@ -0,0 +1,386 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        valgen.cpp
+// Purpose:     wxGenericValidator class
+// Author:      Kevin Smith
+// Modified by:
+// Created:     Jan 22 1999
+// RCS-ID:      
+// Copyright:   (c) 1999 Kevin Smith
+// Licence:    wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation "valgen.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx/utils.h"
+#include "wx/intl.h"
+#endif
+
+#include "wx/spinbutt.h"
+#include "wx/checklst.h"
+
+#include "wx/valgen.h"
+
+wxGenericValidator::wxGenericValidator(bool *val)
+{
+  Initialize();
+  m_pBool = val;
+}
+
+wxGenericValidator::wxGenericValidator(int *val)
+{
+  Initialize();
+  m_pInt = val;
+}
+
+wxGenericValidator::wxGenericValidator(wxString *val)
+{
+  Initialize();
+  m_pString = val;
+}
+
+wxGenericValidator::wxGenericValidator(wxArrayInt *val)
+{
+  Initialize();
+  m_pArrayInt = val;
+}
+
+wxGenericValidator::wxGenericValidator(const wxGenericValidator& val)
+{
+  Copy(val);
+}
+
+bool wxGenericValidator::Copy(const wxGenericValidator& val)
+{
+  wxValidator::Copy(val);
+
+  m_pBool = val.m_pBool;
+  m_pInt = val.m_pInt;
+  m_pString = val.m_pString;
+  m_pArrayInt = val.m_pArrayInt;
+
+  return TRUE;
+}
+
+wxGenericValidator::~wxGenericValidator()
+{
+}
+
+// Called to transfer data to the window
+bool wxGenericValidator::TransferToWindow(void)
+{
+  if ( !m_validatorWindow )
+    return FALSE;
+
+  // bool controls
+  if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckBox)) )
+  {
+    wxCheckBox* pControl = (wxCheckBox*) m_validatorWindow;
+       if (m_pBool)
+    {
+      pControl->SetValue(*m_pBool) ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioButton)) )
+  {
+    wxRadioButton* pControl = (wxRadioButton*) m_validatorWindow;
+       if (m_pBool)
+    {
+      pControl->SetValue(*m_pBool) ;
+      return TRUE;
+    }
+  }
+  // int controls
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxGauge)) )
+  {
+    wxGauge* pControl = (wxGauge*) m_validatorWindow;
+       if (m_pInt)
+    {
+      pControl->SetValue(*m_pInt) ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioBox)) )
+  {
+    wxRadioBox* pControl = (wxRadioBox*) m_validatorWindow;
+       if (m_pInt)
+    {
+      pControl->SetSelection(*m_pInt) ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxScrollBar)) )
+  {
+    wxScrollBar* pControl = (wxScrollBar*) m_validatorWindow;
+       if (m_pInt)
+    {
+      pControl->SetThumbPosition(*m_pInt) ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
+  {
+    wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
+       if (m_pInt)
+    {
+      pControl->SetValue(*m_pInt) ;
+      return TRUE;
+    }
+  }
+  // string controls
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
+  {
+    wxButton* pControl = (wxButton*) m_validatorWindow;
+       if (m_pString)
+    {
+      pControl->SetLabel(*m_pString) ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
+  {
+    wxComboBox* pControl = (wxComboBox*) m_validatorWindow;
+       if (m_pString)
+    {
+      pControl->SetValue(*m_pString) ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) )
+  {
+    wxChoice* pControl = (wxChoice*) m_validatorWindow;
+       if (m_pInt)
+    {
+      pControl->SetSelection(*m_pInt) ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
+  {
+    wxStaticText* pControl = (wxStaticText*) m_validatorWindow;
+       if (m_pString)
+    {
+      pControl->SetLabel(*m_pString) ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) )
+  {
+    wxTextCtrl* pControl = (wxTextCtrl*) m_validatorWindow;
+       if (m_pString)
+    {
+      pControl->SetValue(*m_pString) ;
+      return TRUE;
+    }
+  }
+  // array controls
+  // NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox
+  // MUST come first:
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckListBox)) )
+  {
+    wxCheckListBox* pControl = (wxCheckListBox*) m_validatorWindow;
+       if (m_pArrayInt)
+    {
+      // clear all selections
+      int i;
+      for (i = 0 ; i < pControl->Number(); ++i)
+        pControl->Check(i, FALSE);
+      // select each item in our array
+      unsigned u;
+      for (u = 0; u < m_pArrayInt->Count(); ++u)
+        pControl->Check(m_pArrayInt->Item(u));
+      return TRUE;
+    }
+       else
+               return FALSE;
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) )
+  {
+    wxListBox* pControl = (wxListBox*) m_validatorWindow;
+       if (m_pArrayInt)
+    {
+      // clear all selections
+      int i;
+      for (i = 0 ; i < pControl->Number(); ++i)
+        pControl->Deselect(i);
+      // select each item in our array
+      unsigned u;
+      for (u = 0; u < m_pArrayInt->Count(); ++u)
+        pControl->SetSelection(m_pArrayInt->Item(u));
+      return TRUE;
+    }
+  }
+
+  // unrecognized control, or bad pointer
+  return FALSE;
+}
+
+// Called to transfer data to the window
+bool wxGenericValidator::TransferFromWindow(void)
+{
+  if ( !m_validatorWindow )
+    return FALSE;
+
+  // bool controls
+  if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckBox)) )
+  {
+    wxCheckBox* pControl = (wxCheckBox*) m_validatorWindow;
+       if (m_pBool)
+    {
+      *m_pBool = pControl->GetValue() ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioButton)) )
+  {
+    wxRadioButton* pControl = (wxRadioButton*) m_validatorWindow;
+       if (m_pBool)
+    {
+      *m_pBool = pControl->GetValue() ;
+      return TRUE;
+    }
+  }
+  // int controls
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxGauge)) )
+  {
+    wxGauge* pControl = (wxGauge*) m_validatorWindow;
+       if (m_pInt)
+    {
+      *m_pInt = pControl->GetValue() ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioBox)) )
+  {
+    wxRadioBox* pControl = (wxRadioBox*) m_validatorWindow;
+       if (m_pInt)
+    {
+      *m_pInt = pControl->GetSelection() ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxScrollBar)) )
+  {
+    wxScrollBar* pControl = (wxScrollBar*) m_validatorWindow;
+       if (m_pInt)
+    {
+      *m_pInt = pControl->GetThumbPosition() ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
+  {
+    wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
+       if (m_pInt)
+    {
+      *m_pInt = pControl->GetValue() ;
+      return TRUE;
+    }
+  }
+  // string controls
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
+  {
+    wxButton* pControl = (wxButton*) m_validatorWindow;
+       if (m_pString)
+    {
+      *m_pString = pControl->GetLabel() ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
+  {
+    wxComboBox* pControl = (wxComboBox*) m_validatorWindow;
+       if (m_pString)
+    {
+      *m_pString = pControl->GetValue() ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) )
+  {
+    wxChoice* pControl = (wxChoice*) m_validatorWindow;
+       if (m_pInt)
+    {
+      *m_pInt = pControl->GetSelection() ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
+  {
+    wxStaticText* pControl = (wxStaticText*) m_validatorWindow;
+       if (m_pString)
+    {
+      *m_pString = pControl->GetLabel() ;
+      return TRUE;
+    }
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) )
+  {
+    wxTextCtrl* pControl = (wxTextCtrl*) m_validatorWindow;
+       if (m_pString)
+    {
+      *m_pString = pControl->GetValue() ;
+      return TRUE;
+    }
+  }
+  // array controls
+  // NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox
+  // MUST come first:
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckListBox)) )
+  {
+    wxCheckListBox* pControl = (wxCheckListBox*) m_validatorWindow;
+       if (m_pArrayInt)
+    {
+      // clear our array
+      m_pArrayInt->Clear();
+      // add each selected item to our array
+      int i;
+      for (i = 0 ; i < pControl->Number(); ++i)
+        if (pControl->IsChecked(i))
+          m_pArrayInt->Add(i);
+      return TRUE;
+    }
+       else
+         return FALSE;
+  }
+  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) )
+  {
+    wxListBox* pControl = (wxListBox*) m_validatorWindow;
+       if (m_pArrayInt)
+    {
+      // clear our array
+      m_pArrayInt->Clear();
+      // add each selected item to our array
+      int i;
+      for (i = 0 ; i < pControl->Number(); ++i)
+        if (pControl->Selected(i))
+          m_pArrayInt->Add(i);
+      return TRUE;
+    }
+  }
+
+  // unrecognized control, or bad pointer
+  return FALSE;
+}
+
+/*
+  Called by constructors to initialize ALL data members
+*/
+void wxGenericValidator::Initialize()
+{
+  m_pBool = 0;
+  m_pInt = 0;
+  m_pString = 0;
+  m_pArrayInt = 0;
+}
+
index c2fa2e44606fe049cac26114668fac5f962a19b9..821187bd46c335f632279ac6b289d00f6b701e63 100644 (file)
@@ -54,6 +54,7 @@ LIB_CPP_SRC=\
  common/objstrm.cpp \
  common/sckstrm.cpp \
  common/validate.cpp \
+ common/valgen.cpp \
  common/valtext.cpp \
  common/variant.cpp \
  common/socket.cpp \
index 3b0679bd8b5990860c4b05205f52f095a609a7ca..4736d0f71f466bf9925421132d2dd060f05690e6 100644 (file)
@@ -55,6 +55,7 @@ LIB_CPP_SRC=\
  common/objstrm.cpp \
  common/sckstrm.cpp \
  common/validate.cpp \
+ common/valgen.cpp \
  common/valtext.cpp \
  common/variant.cpp \
  common/wxexpr.cpp \
index eda10a023f95616be797840b1b7d566cedb24a86..6a0d47c13ded27836de3737171371013ea74fffb 100644 (file)
@@ -59,6 +59,7 @@ LIB_CPP_SRC=\
  ../common/objstrm.cpp \
  ../common/sckstrm.cpp \
  ../common/validate.cpp \
+ ../common/valgen.cpp \
  ../common/valtext.cpp \
  ../common/variant.cpp \
  ../common/wxexpr.cpp \
index 15d88838edd243af9558784f43d87ea7983e14d9..0183737a6ab19b7b211901941b4165f46e0de82c 100644 (file)
@@ -127,6 +127,7 @@ COMMONOBJS = \
   $(MSWDIR)\timercmn.obj \
   $(MSWDIR)\utilscmn.obj \
   $(MSWDIR)\validate.obj \
+  $(MSWDIR)\valgen.obj \
   $(MSWDIR)\valtext.obj \
   $(MSWDIR)\variant.obj \
   $(MSWDIR)\date.obj \
@@ -539,6 +540,8 @@ $(MSWDIR)\utilscmn.obj:     $(COMMDIR)\utilscmn.$(SRCSUFF)
 
 $(MSWDIR)\validate.obj:     $(COMMDIR)\validate.$(SRCSUFF)
 
+$(MSWDIR)\valgen.obj:     $(COMMDIR)\valtext.$(SRCSUFF)
+
 $(MSWDIR)\valtext.obj:     $(COMMDIR)\valtext.$(SRCSUFF)
 
 $(MSWDIR)\date.obj:     $(COMMDIR)\date.$(SRCSUFF)
index 240d9ac3c16401fe48753326c675af75d3c9824e..fdbd53bab7ea8b0950c2befd6d7211ad9bc6f055 100644 (file)
@@ -124,6 +124,7 @@ COMMONOBJS = \
   $(MSWDIR)\timercmn.obj \
   $(MSWDIR)\utilscmn.obj \
   $(MSWDIR)\validate.obj \
+  $(MSWDIR)\valgen.obj \
   $(MSWDIR)\valtext.obj \
   $(MSWDIR)\variant.obj \
   $(MSWDIR)\date.obj \
@@ -526,6 +527,8 @@ $(MSWDIR)\utilscmn.obj:     $(COMMDIR)\utilscmn.$(SRCSUFF)
 
 $(MSWDIR)\validate.obj:     $(COMMDIR)\validate.$(SRCSUFF)
 
+$(MSWDIR)\valgen.obj:     $(COMMDIR)\valgen.$(SRCSUFF)
+
 $(MSWDIR)\valtext.obj:     $(COMMDIR)\valtext.$(SRCSUFF)
 
 $(MSWDIR)\date.obj:     $(COMMDIR)\date.$(SRCSUFF)
index 1727d1747f84cb1ccd3452b4fa62285bcbc4a842..97fec5e99fa52d185ba3ea4c91c2874f1c646a28 100644 (file)
@@ -105,6 +105,7 @@ COMMONOBJS = \
   $(COMMDIR)\timercmn.obj \
   $(COMMDIR)\utilscmn.obj \
   $(COMMDIR)\validate.obj \
+  $(COMMDIR)\valgen.obj \
   $(COMMDIR)\valtext.obj \
   $(COMMDIR)\date.obj \
   $(COMMDIR)\wxexpr.obj \
@@ -833,6 +834,11 @@ $(COMMDIR)/validate.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(COMMDIR)/valgen.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(COMMDIR)/valtext.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
index aee32cbfd7d9b492ec3a28c0d07b1e4adf0e2f2f..455592f62c97e95a02c4c57736d5030bb679f2ec 100644 (file)
@@ -111,6 +111,7 @@ COMMONOBJS = \
   $(COMMDIR)/timercmn.$(OBJSUFF) \
   $(COMMDIR)/utilscmn.$(OBJSUFF) \
   $(COMMDIR)/validate.$(OBJSUFF) \
+  $(COMMDIR)/valgen.$(OBJSUFF) \
   $(COMMDIR)/valtext.$(OBJSUFF) \
   $(COMMDIR)/date.$(OBJSUFF) \
   $(COMMDIR)/wxexpr.$(OBJSUFF) \
index 4828b35b59d15be07ffde2aecd6e92411894f29b..2bea2b583cb3aa22bc96585912fa8d7dc4b15b42 100644 (file)
@@ -83,6 +83,7 @@ COMMONOBJS = \
   $(COMMDIR)\timercmn.obj \
   $(COMMDIR)\utilscmn.obj \
   $(COMMDIR)\validate.obj \
+  $(COMMDIR)\valgen.obj \
   $(COMMDIR)\valtext.obj \
   $(COMMDIR)\date.obj \
   $(COMMDIR)\hash.obj \
index 105badbf23339792fa683220033e0cba488da270..ffe534970a880f2331e4722c64ab93e80d4d83a4 100644 (file)
@@ -69,6 +69,7 @@ COMMONOBJS = cmndata.obj \
   timercmn.obj \
   utilscmn.obj \
   validate.obj \
+  valgen.obj \
   valtext.obj \
   date.obj \
   hash.obj \
@@ -598,6 +599,9 @@ utilscmn.obj:     $(COMMDIR)\utilscmn.cpp
 validate.obj:     $(COMMDIR)\validate.cpp
   $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\validate.cpp /BINARY validate.obj
 
+valgen.obj:     $(COMMDIR)\valgen.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\valgen.cpp /BINARY valgen.obj
+
 valtext.obj:     $(COMMDIR)\valtext.cpp
   $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\valtext.cpp /BINARY valtext.obj
 
index 832d3a8fc8e6896178e0edff1758414efcd4c1d8..503c878f4f2a3f916c0c2be9c7d85e5ebf44f4e8 100644 (file)
@@ -108,6 +108,7 @@ COMMONOBJS = \
   $(COMMDIR)/timercmn.$(OBJSUFF) \
   $(COMMDIR)/utilscmn.$(OBJSUFF) \
   $(COMMDIR)/validate.$(OBJSUFF) \
+  $(COMMDIR)/valgen.$(OBJSUFF) \
   $(COMMDIR)/valtext.$(OBJSUFF) \
   $(COMMDIR)/date.$(OBJSUFF) \
   $(COMMDIR)/wxexpr.$(OBJSUFF) \
index 8be1b36ec8c7f5b56d49c1e7288c0ce8728fbf0e..73b6293aa8641d3b37734edd2c0d3eb570253f1f 100644 (file)
@@ -112,6 +112,7 @@ COMMONOBJS = \
   $(COMMDIR)\timercmn.obj \
   $(COMMDIR)\utilscmn.obj \
   $(COMMDIR)\validate.obj \
+  $(COMMDIR)\valgen.obj \
   $(COMMDIR)\valtext.obj \
   $(COMMDIR)\date.obj \
   $(COMMDIR)\hash.obj \
@@ -927,6 +928,11 @@ $(COMMDIR)/validate.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
 <<
 
+$(COMMDIR)/valgen.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
+<<
+
 $(COMMDIR)/valtext.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
index 37416522c1b02a41410361994567bb080f6eb860..4bbe86118417d99293d138a226556574063db9f1 100644 (file)
@@ -79,6 +79,7 @@ COMMONOBJS = cmndata.obj &
   timercmn.obj &
   utilscmn.obj &
   validate.obj &
+  valgen.obj &
   valtext.obj &
   date.obj &
   hash.obj &
@@ -610,6 +611,9 @@ utilscmn.obj:     $(COMMDIR)\utilscmn.cpp
 validate.obj:     $(COMMDIR)\validate.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
+valgen.obj:     $(COMMDIR)\valgen.cpp
+  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
 valtext.obj:     $(COMMDIR)\valtext.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
index 2f63d56891e7e31085b75c7ec711df884c96c93f..20543be9213b633785625b186bcc4c3d5192fe19 100644 (file)
@@ -52,6 +52,7 @@ LIB_CPP_SRC=\
  common/objstrm.cpp \
  common/sckstrm.cpp \
  common/validate.cpp \
+ common/valgen.cpp \
  common/valtext.cpp \
  common/variant.cpp \
  common/wxexpr.cpp \
index abd4765ea408fde461ca806d4742997472007984..365042e45f2f9003721451fb2838169d07b1bad9 100644 (file)
@@ -57,6 +57,7 @@ LIB_CPP_SRC=\
  ../common/objstrm.cpp \
  ../common/sckstrm.cpp \
  ../common/validate.cpp \
+ ../common/valgen.cpp \
  ../common/valtext.cpp \
  ../common/variant.cpp \
  ../common/wxexpr.cpp \
index 18136ec66484c83af584657c53c578595cef573e..b0a6240fef87443be91f7232ec50af8ebafa106d 100644 (file)
@@ -145,6 +145,7 @@ COMMONOBJS = \
   $(COMMDIR)\timercmn.obj \
   $(COMMDIR)\utilscmn.obj \
   $(COMMDIR)\validate.obj \
+  $(COMMDIR)\valgen.obj \
   $(COMMDIR)\valtext.obj \
   $(COMMDIR)\date.obj \
   $(COMMDIR)\hash.obj \
@@ -750,6 +751,11 @@ $(COMMDIR)/validate.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
 <<
 
+$(COMMDIR)/valgen.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
+<<
+
 $(COMMDIR)/valtext.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
index 252bcb8c0cd8c7ae9819662eb3b6ca2b1e283e3b..44449532ea0249d3f2ca6dd16e9f46b2ef94f827 100644 (file)
@@ -23,8 +23,6 @@
 #include <wx/frame.h>
 #endif
 
-#include "GL/gl.h"
-
 #include "glcanvas.h"
 
 /*
index 5c84eb5db081316414a92ad660d49e659aa32468..a21382a987a989ad4b17867fa3382ffac8321db4 100644 (file)
@@ -18,6 +18,8 @@
 
 #include <wx/scrolwin.h>
 
+#include <windows.h>
+
 #include "gl/gl.h"
 
 class wxGLContext: public wxObject