]> git.saurik.com Git - wxWidgets.git/commitdiff
some Linux compilation fixes
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 29 Nov 1998 22:21:32 +0000 (22:21 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 29 Nov 1998 22:21:32 +0000 (22:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/filefn.h
include/wx/generic/tabg.h
include/wx/postscrp.h
include/wx/resource.h
include/wx/variant.h
include/wx/wxexpr.h

index e5a12a873a70d23165d30378006743cf53a3dffa..c9c7cd721c2dfec452a592fb4ee167ad66564b51 100644 (file)
@@ -186,21 +186,22 @@ WXDLLEXPORT bool wxFindFileInPath(wxString *pStr, const char *pszPath, const cha
 // ----------------------------------------------------------------------------
 
 // Path searching
-class WXDLLEXPORT wxPathList: public wxStringList
+class WXDLLEXPORT wxPathList : public wxStringList
 {
-  DECLARE_DYNAMIC_CLASS(wxPathList)
-
-  public:
-  void AddEnvList(const wxString& envVariable);    // Adds all paths in environment variable
-  void Add(const wxString& path);
-  wxString FindValidPath(const wxString& filename);   // Find the first full path
-                                         // for which the file exists
-  wxString FindAbsoluteValidPath(const wxString& filename);   // Find the first full path
-                                         // for which the file exists; ensure it's an absolute
-                                         // path that gets returned.
-  void EnsureFileAccessible(const wxString& path); // Given full path and filename,
-                                         // add path to list
-  bool Member(const wxString& path);
+public:
+    void AddEnvList(const wxString& envVariable);    // Adds all paths in environment variable
+    void Add(const wxString& path);
+    wxString FindValidPath(const wxString& filename);   // Find the first full path
+    // for which the file exists
+    wxString FindAbsoluteValidPath(const wxString& filename);   // Find the first full path
+    // for which the file exists; ensure it's an absolute
+    // path that gets returned.
+    void EnsureFileAccessible(const wxString& path); // Given full path and filename,
+    // add path to list
+    bool Member(const wxString& path);
+
+private:
+    DECLARE_DYNAMIC_CLASS(wxPathList)
 };
 
 #endif
index c5c468a241432c53d8707bb5efed1475611486fd..5ae093690b257410e1d6322ca5fa86c4a9aee7d9 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     01/02/97
 // RCS-ID:      $Id$
 // Copyright:   (c)
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef __TABGH_G__
@@ -28,14 +28,14 @@ class WXDLLEXPORT wxTabView;
  * A wxTabControl is the internal and visual representation
  * of the tab.
  */
+
 class WXDLLEXPORT wxTabControl: public wxObject
 {
 DECLARE_DYNAMIC_CLASS(wxTabControl)
 public:
     wxTabControl(wxTabView *v = (wxTabView *) NULL);
     ~wxTabControl(void);
-    
+
     virtual void OnDraw(wxDC& dc, bool lastInRow);
     inline void SetLabel(const wxString& str) { m_controlLabel = str; }
     inline wxString GetLabel(void) const { return m_controlLabel; }
@@ -48,20 +48,20 @@ public:
 
     inline void SetPosition(int x, int y) { m_offsetX = x; m_offsetY = y; }
     inline void SetSize(int x, int y) { m_width = x; m_height = y; }
-    
+
     inline void SetRowPosition(int r) { m_rowPosition = r; }
     inline int GetRowPosition() const { return m_rowPosition; }
     inline void SetColPosition(int c) { m_colPosition = c; }
     inline int GetColPosition() const { return m_colPosition; }
-    
+
     inline int GetX(void) const { return m_offsetX; }
     inline int GetY(void) const { return m_offsetY; }
     inline int GetWidth(void) const { return m_width; }
     inline int GetHeight(void) const { return m_height; }
-    
+
     inline int GetId(void) const { return m_id; }
     inline void SetId(int i) { m_id = i; }
-    
+
     virtual bool HitTest(int x, int y) const ;
 
 protected:
@@ -77,19 +77,14 @@ protected:
     int             m_rowPosition; // Position in row from 0
     int             m_colPosition; // Position in col from 0
 };
+
 /*
  * Each wxTabLayer is a list of tabs. E.g. there
  * are 3 layers in the MS Word Options dialog.
  */
+
 class WXDLLEXPORT wxTabLayer: public wxList
 {
-  DECLARE_DYNAMIC_CLASS(wxTabLayer)
-  public:
-    wxTabLayer(void)
-    {
-    }
 };
 
 /*
index 1270ff477a8f776503d75c58e7ad69d783186288..73fd4dc59dbcf621a424fe4c5aee7ef68fbf4e2a 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     01/02/97
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_POSTSCRPH__
@@ -49,10 +49,10 @@ class WXDLLEXPORT wxPostScriptDC: public wxDC
 
  public:
   // Create a printer DC
-  wxPostScriptDC(void);
+  wxPostScriptDC();
   wxPostScriptDC(const wxString& output, bool interactive = TRUE, wxWindow *parent = (wxWindow *) NULL);
 
-  ~wxPostScriptDC(void);
+  ~wxPostScriptDC();
 
   bool Create(const wxString& output, bool interactive = TRUE, wxWindow *parent = (wxWindow *) NULL);
 
@@ -92,25 +92,25 @@ class WXDLLEXPORT wxPostScriptDC: public wxDC
 #endif
   void DrawText(const wxString& text, long x, long y, bool use16 = FALSE);
 
-  void Clear(void);
+  void Clear();
   void SetFont(const wxFont& font);
   void SetPen(const wxPen& pen);
   void SetBrush(const wxBrush& brush);
   void SetLogicalFunction(int function);
   void SetBackground(const wxBrush& brush);
   void SetClippingRegion(long x, long y, long width, long height);
-  void DestroyClippingRegion(void);
+  void DestroyClippingRegion();
 
   bool StartDoc(const wxString& message);
-  void EndDoc(void);
-  void StartPage(void);
-  void EndPage(void);
+  void EndDoc();
+  void StartPage();
+  void EndPage();
 
-  long GetCharHeight(void);
-  long GetCharWidth(void);
+  long GetCharHeight();
+  long GetCharWidth();
   void GetTextExtent(const wxString& string, long *x, long *y,
-                     long *descent = (long *) NULL, 
-                                        long *externalLeading = (long *) NULL,
+                     long *descent = (long *) NULL,
+                     long *externalLeading = (long *) NULL,
                      wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE);
   virtual void SetLogicalOrigin(long x, long y);
   virtual void CalcBoundingBox(long x, long y);
@@ -165,8 +165,8 @@ class WXDLLEXPORT wxPostScriptPrintDialog: public wxDialog
 DECLARE_CLASS(wxPostScriptPrintDialog)
 public:
     wxPostScriptPrintDialog (wxWindow *parent, const wxString& title,
-                     const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
-                         long style = wxDEFAULT_DIALOG_STYLE);
+          const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
+          long style = wxDEFAULT_DIALOG_STYLE);
 
     virtual int ShowModal(void) ;
 };
@@ -197,15 +197,15 @@ WXDLLEXPORT void wxSetPrinterFile(const char *f);
 WXDLLEXPORT void wxSetAFMPath(const char *f);
 
 // Get current values
-WXDLLEXPORT char* wxGetPrinterCommand(void);
-WXDLLEXPORT char* wxGetPrintPreviewCommand(void);
-WXDLLEXPORT char* wxGetPrinterOptions(void);
-WXDLLEXPORT int wxGetPrinterOrientation(void);
+WXDLLEXPORT char* wxGetPrinterCommand();
+WXDLLEXPORT char* wxGetPrintPreviewCommand();
+WXDLLEXPORT char* wxGetPrinterOptions();
+WXDLLEXPORT int wxGetPrinterOrientation();
 WXDLLEXPORT void wxGetPrinterScaling(double* x, double* y);
 WXDLLEXPORT void wxGetPrinterTranslation(long *x, long *y);
-WXDLLEXPORT int wxGetPrinterMode(void);
-WXDLLEXPORT char* wxGetPrinterFile(void);
-WXDLLEXPORT char* wxGetAFMPath(void);
+WXDLLEXPORT int wxGetPrinterMode();
+WXDLLEXPORT char* wxGetPrinterFile();
+WXDLLEXPORT char* wxGetAFMPath();
 
 /*
  * PostScript print setup information
@@ -213,55 +213,57 @@ WXDLLEXPORT char* wxGetAFMPath(void);
 
 class WXDLLEXPORT wxPrintSetupData: public wxObject
 {
-  DECLARE_DYNAMIC_CLASS(wxPrintSetupData)
+public:
+    char *printerCommand;
+    char *previewCommand;
+    char *printerFlags;
+    char *printerFile;
+    int printerOrient;
+    double printerScaleX;
+    double printerScaleY;
+    long printerTranslateX;
+    long printerTranslateY;
+    // 1 = Preview, 2 = print to file, 3 = send to printer
+    int printerMode;
+    char *afmPath;
+    // A name in the paper database (see wx_print.h: the printing framework)
+    char *paperName;
+    bool printColour;
 
- public:
-  char *printerCommand;
-  char *previewCommand;
-  char *printerFlags;
-  char *printerFile;
-  int printerOrient;
-  double printerScaleX;
-  double printerScaleY;
-  long printerTranslateX;
-  long printerTranslateY;
-  // 1 = Preview, 2 = print to file, 3 = send to printer
-  int printerMode;
-  char *afmPath;
-  // A name in the paper database (see wx_print.h: the printing framework)
-  char *paperName;
-  bool printColour;
- public:
-  wxPrintSetupData(void);
-  ~wxPrintSetupData(void);
-
-  void SetPrinterCommand(const char *cmd);
-  void SetPaperName(const char *paper);
-  void SetPrintPreviewCommand(const char *cmd);
-  void SetPrinterOptions(const char *flags);
-  void SetPrinterFile(const char *f);
-  void SetPrinterOrientation(int orient);
-  void SetPrinterScaling(double x, double y);
-  void SetPrinterTranslation(long x, long y);
-  // 1 = Preview, 2 = print to file, 3 = send to printer
-  void SetPrinterMode(int mode);
-  void SetAFMPath(const char *f);
-  void SetColour(bool col);
-
-  // Get current values
-  char *GetPrinterCommand(void);
-  char *GetPrintPreviewCommand(void);
-  char *GetPrinterOptions(void);
-  char *GetPrinterFile(void);
-  char *GetPaperName(void);
-  int GetPrinterOrientation(void);
-  void GetPrinterScaling(double* x, double* y);
-  void GetPrinterTranslation(long *x, long *y);
-  int GetPrinterMode(void);
-  char *GetAFMPath(void);
-  bool GetColour(void);
-
-  void operator=(wxPrintSetupData& data);
+public:
+    wxPrintSetupData();
+    ~wxPrintSetupData();
+
+    void SetPrinterCommand(const char *cmd);
+    void SetPaperName(const char *paper);
+    void SetPrintPreviewCommand(const char *cmd);
+    void SetPrinterOptions(const char *flags);
+    void SetPrinterFile(const char *f);
+    void SetPrinterOrientation(int orient);
+    void SetPrinterScaling(double x, double y);
+    void SetPrinterTranslation(long x, long y);
+    // 1 = Preview, 2 = print to file, 3 = send to printer
+    void SetPrinterMode(int mode);
+    void SetAFMPath(const char *f);
+    void SetColour(bool col);
+
+    // Get current values
+    char *GetPrinterCommand();
+    char *GetPrintPreviewCommand();
+    char *GetPrinterOptions();
+    char *GetPrinterFile();
+    char *GetPaperName();
+    int GetPrinterOrientation();
+    void GetPrinterScaling(double* x, double* y);
+    void GetPrinterTranslation(long *x, long *y);
+    int GetPrinterMode();
+    char *GetAFMPath();
+    bool GetColour();
+
+    void operator=(wxPrintSetupData& data);
+
+private:
+  DECLARE_DYNAMIC_CLASS(wxPrintSetupData)
 };
 
 WXDLLEXPORT_DATA(extern wxPrintSetupData*) wxThePrintSetupData;
@@ -274,32 +276,35 @@ WXDLLEXPORT extern void wxInitializePrintSetupData(bool init = TRUE);
 
 class WXDLLEXPORT wxPrintPaperType: public wxObject
 {
-  DECLARE_DYNAMIC_CLASS(wxPrintPaperType)
+public:
+    wxPrintPaperType(const char *name = (const char *) NULL, int wmm = 0, int hmm = 0, int wp = 0, int hp = 0);
+    ~wxPrintPaperType();
 
- public:
-  int widthMM;
-  int heightMM;
-  int widthPixels;
-  int heightPixels;
-  char *pageName;
-
-  wxPrintPaperType(const char *name = (const char *) NULL, int wmm = 0, int hmm = 0, int wp = 0, int hp = 0);
-  ~wxPrintPaperType(void);
+public:
+    int widthMM;
+    int heightMM;
+    int widthPixels;
+    int heightPixels;
+    char *pageName;
+
+private:
+    DECLARE_DYNAMIC_CLASS(wxPrintPaperType)
 };
 
 class WXDLLEXPORT wxPrintPaperDatabase: public wxList
 {
-  DECLARE_DYNAMIC_CLASS(wxPrintPaperDatabase)
+public:
+    wxPrintPaperDatabase();
+    ~wxPrintPaperDatabase();
 
- public:
-  wxPrintPaperDatabase(void);
-  ~wxPrintPaperDatabase(void);
+    void CreateDatabase();
+    void ClearDatabase();
 
-  void CreateDatabase(void);
-  void ClearDatabase(void);
+    void AddPaperType(const char *name, int wmm, int hmm, int wp, int hp);
+    wxPrintPaperType *FindPaperType(const char *name);
 
-  void AddPaperType(const char *name, int wmm, int hmm, int wp, int hp);
-  wxPrintPaperType *FindPaperType(const char *name);
+private:
+    DECLARE_DYNAMIC_CLASS(wxPrintPaperDatabase)
 };
 
 WXDLLEXPORT_DATA(extern wxPrintPaperDatabase*) wxThePrintPaperDatabase;
index 0b0357e55456b56623eff7bbf2eb1336d4f0fa4d..347386024cc0b816e946ebda89e08f9a1580a789 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     01/02/97
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_RESOURCEH__
 /*
  * Internal format for control/panel item
  */
+
 class WXDLLEXPORT wxItemResource: public wxObject
 {
   DECLARE_DYNAMIC_CLASS(wxItemResource)
 
  public:
+
   wxItemResource();
   ~wxItemResource();
 
index 157259cc5fb82c0116c255ded6e3aabb5691dd55..78f41fc575710f0b0db4d6117665c9cd8bb37137 100644 (file)
@@ -84,20 +84,20 @@ public:
 
 // Construction & destruction
     wxVariant();
-    wxVariant(double val, const wxString& name = wxEmptyString);
-    wxVariant(long val, const wxString& name = wxEmptyString);
-    wxVariant(bool val, const wxString& name = wxEmptyString);
-    wxVariant(char val, const wxString& name = wxEmptyString);
-    wxVariant(const wxString& val, const wxString& name = wxEmptyString);
-    wxVariant(const char* val, const wxString& name = wxEmptyString); // Necessary or VC++ assumes bool!
-    wxVariant(const wxStringList& val, const wxString& name = wxEmptyString);
-    wxVariant(const wxList& val, const wxString& name = wxEmptyString); // List of variants
+    wxVariant(double val, const wxString& name = g_szNul);
+    wxVariant(long val, const wxString& name = g_szNul);
+    wxVariant(bool val, const wxString& name = g_szNul);
+    wxVariant(char val, const wxString& name = g_szNul);
+    wxVariant(const wxString& val, const wxString& name = g_szNul);
+    wxVariant(const char* val, const wxString& name = g_szNul); // Necessary or VC++ assumes bool!
+    wxVariant(const wxStringList& val, const wxString& name = g_szNul);
+    wxVariant(const wxList& val, const wxString& name = g_szNul); // List of variants
 #if wxUSE_TIMEDATE
-    wxVariant(const wxTime& val, const wxString& name = wxEmptyString); // Time
-    wxVariant(const wxDate& val, const wxString& name = wxEmptyString); // Date
+    wxVariant(const wxTime& val, const wxString& name = g_szNul); // Time
+    wxVariant(const wxDate& val, const wxString& name = g_szNul); // Date
 #endif
-    wxVariant(void* ptr, const wxString& name = wxEmptyString); // void* (general purpose)
-    wxVariant(wxVariantData* data, const wxString& name = wxEmptyString); // User-defined data
+    wxVariant(void* ptr, const wxString& name = g_szNul); // void* (general purpose)
+    wxVariant(wxVariantData* data, const wxString& name = g_szNul); // User-defined data
     wxVariant(const wxVariant& variant);
     ~wxVariant();
 
index 1135438fbdaac3e57fcb805a26947b1b7e9081bd..76aad36b0d36114d0dcd30b80749c8159022d870 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     01/02/97
 // RCS-ID:      $Id$
 // Copyright:   (c)
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_WXEXPRH__
@@ -205,59 +205,62 @@ class WXDLLEXPORT wxExpr
 
 class WXDLLEXPORT wxExprDatabase: public wxList
 {
-  DECLARE_DYNAMIC_CLASS(wxExprDatabase)
- private:
-  wxNode *position;              // Where we are in a search
-  wxHashTable *hash_table;
-  wxString attribute_to_hash;
- public:
-  int noErrors;
-
-  wxExprDatabase(wxExprErrorHandler handler = 0);
-
-  // Use hashing on both the functor, and the attribute of
-  // specified type (wxExprString or wxExprInteger) and name.
-  // So to find node 45
-  // (i.e. match the clause node(id=45, ...))
-  // it usually requires 1 look-up: the keys for functor and attribute
-  // are added together.
-  // Obviously if the attribute was missing in a clause, it would
-  // fail to be found by this method, but could be retrieved by a
-  // linear search using BeginFind and FindClauseByFunctor,
-  // or just searching through the list as per usual.
-
-  wxExprDatabase(wxExprType type, const wxString& attribute, int size = 500,
-                 wxExprErrorHandler handler = 0);
-
-  ~wxExprDatabase(void);
-
-  void BeginFind(void) ;          // Initialise a search
-  wxExpr *FindClause(long id) ;  // Find a term based on an integer id attribute
-                                 // e.g. node(id=23, type=rectangle, ....).
-
-  // Find on basis of attribute/value pairs, e.g. type=rectangle
-  // This doesn't use hashing; it's a linear search.
-  wxExpr *FindClause(const wxString& word, const wxString& value);
-  wxExpr *FindClause(const wxString& word, long value);
-  wxExpr *FindClause(const wxString& word, double value);
-  wxExpr *FindClauseByFunctor(const wxString& functor);
-
-  wxExpr *HashFind(const wxString& functor, const wxString& value) const;
-  wxExpr *HashFind(const wxString& functor, long value) const;
-
-  void Append(wxExpr *expr);  // Does cleverer things if hashing is on
-  void ClearDatabase(void);
-  inline int GetErrorCount() const { return noErrors; }
-  bool Read(const wxString& filename);
-  bool ReadFromString(const wxString& buffer);
-  bool Write(const wxString& fileName);
-  bool Write(ostream& stream);
-  void WriteLisp(ostream& stream);
-  
-  // Compatibility
-  inline bool ReadProlog(char *filename) { return Read(wxString(filename)); }
-  inline bool ReadPrologFromString(char *buffer) { return ReadFromString(wxString(buffer)); }
-  inline void WriteProlog(ostream& stream) { Write(stream); }
+private:
+    wxNode *position;              // Where we are in a search
+    wxHashTable *hash_table;
+    wxString attribute_to_hash;
+
+public:
+    int noErrors;
+
+    wxExprDatabase(wxExprErrorHandler handler = 0);
+
+    // Use hashing on both the functor, and the attribute of
+    // specified type (wxExprString or wxExprInteger) and name.
+    // So to find node 45
+    // (i.e. match the clause node(id=45, ...))
+    // it usually requires 1 look-up: the keys for functor and attribute
+    // are added together.
+    // Obviously if the attribute was missing in a clause, it would
+    // fail to be found by this method, but could be retrieved by a
+    // linear search using BeginFind and FindClauseByFunctor,
+    // or just searching through the list as per usual.
+
+    wxExprDatabase(wxExprType type, const wxString& attribute, int size = 500,
+            wxExprErrorHandler handler = 0);
+
+    ~wxExprDatabase(void);
+
+    void BeginFind(void) ;          // Initialise a search
+    wxExpr *FindClause(long id) ;  // Find a term based on an integer id attribute
+    // e.g. node(id=23, type=rectangle, ....).
+
+    // Find on basis of attribute/value pairs, e.g. type=rectangle
+    // This doesn't use hashing; it's a linear search.
+    wxExpr *FindClause(const wxString& word, const wxString& value);
+    wxExpr *FindClause(const wxString& word, long value);
+    wxExpr *FindClause(const wxString& word, double value);
+    wxExpr *FindClauseByFunctor(const wxString& functor);
+
+    wxExpr *HashFind(const wxString& functor, const wxString& value) const;
+    wxExpr *HashFind(const wxString& functor, long value) const;
+
+    void Append(wxExpr *expr);  // Does cleverer things if hashing is on
+    void ClearDatabase(void);
+    inline int GetErrorCount() const { return noErrors; }
+    bool Read(const wxString& filename);
+    bool ReadFromString(const wxString& buffer);
+    bool Write(const wxString& fileName);
+    bool Write(ostream& stream);
+    void WriteLisp(ostream& stream);
+
+    // Compatibility
+    inline bool ReadProlog(char *filename) { return Read(wxString(filename)); }
+    inline bool ReadPrologFromString(char *buffer) { return ReadFromString(wxString(buffer)); }
+    inline void WriteProlog(ostream& stream) { Write(stream); }
+
+private:
+    DECLARE_DYNAMIC_CLASS(wxExprDatabase)
 };
 
 // Function call-style interface - some more convenience wrappers/unwrappers