Initial revision

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1998-05-20 14:01:55 +00:00
parent 1b66e7e5ab
commit c801d85f15
779 changed files with 172138 additions and 0 deletions

113
include/wx/gtk/app.h Normal file
View File

@@ -0,0 +1,113 @@
/////////////////////////////////////////////////////////////////////////////
// Name: app.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKAPPH__
#define __GTKAPPH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/window.h"
#include "wx/frame.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxApp;
class wxLog;
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern wxApp *wxTheApp;
//-----------------------------------------------------------------------------
// global functions
//-----------------------------------------------------------------------------
void wxExit(void);
bool wxYield(void);
//-----------------------------------------------------------------------------
// constants
//-----------------------------------------------------------------------------
#define wxPRINT_WINDOWS 1
#define wxPRINT_POSTSCRIPT 2
//-----------------------------------------------------------------------------
// wxApp
//-----------------------------------------------------------------------------
class wxApp: public wxEvtHandler
{
DECLARE_DYNAMIC_CLASS(wxApp)
public:
wxApp(void);
~wxApp(void);
static void SetInitializerFunction(wxAppInitializerFunction fn) { m_appInitFn = fn; }
static wxAppInitializerFunction GetInitializerFunction(void) { return m_appInitFn; }
virtual bool OnInit(void);
virtual bool OnInitGui(void);
virtual int OnRun(void);
virtual bool OnIdle(void);
virtual int OnExit(void);
wxWindow *GetTopWindow(void);
void SetTopWindow( wxWindow *win );
virtual int MainLoop(void);
void ExitMainLoop(void);
bool Initialized(void);
virtual bool Pending(void);
virtual void Dispatch(void);
void DeletePendingObjects(void);
inline wxString GetAppName(void) const {
if (m_appName != "")
return m_appName;
else return m_className;
}
inline void SetAppName(const wxString& name) { m_appName = name; };
inline wxString GetClassName(void) const { return m_className; }
inline void SetClassName(const wxString& name) { m_className = name; }
inline void SetExitOnFrameDelete(bool flag) { m_exitOnFrameDelete = flag; }
inline bool GetExitOnFrameDelete(void) const { return m_exitOnFrameDelete; }
void SetPrintMode(int WXUNUSED(mode) ) {};
int GetPrintMode(void) const { return wxPRINT_POSTSCRIPT; };
static void CommonInit(void);
static void CommonCleanUp(void);
// override this function to create default log target of arbitrary
// user-defined classv (default implementation creates a wxLogGui object)
virtual wxLog *CreateLogTarget();
bool m_initialized;
bool m_exitOnFrameDelete;
gint m_idleTag;
wxWindow *m_topWindow;
wxString m_appName;
wxString m_className;
int argc;
char **argv;
static wxAppInitializerFunction m_appInitFn;
};
#endif // __GTKAPPH__

118
include/wx/gtk/bitmap.h Normal file
View File

@@ -0,0 +1,118 @@
/////////////////////////////////////////////////////////////////////////////
// Name: bitmap.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKBITMAPH__
#define __GTKBITMAPH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/string.h"
#include "wx/palette.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxDC;
class wxPaintDC;
class wxMemoryDC;
class wxToolBarGTK;
class wxMask;
class wxBitmap;
//-----------------------------------------------------------------------------
// wxMask
//-----------------------------------------------------------------------------
class wxMask: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxMask)
public:
wxMask(void);
wxMask( const wxBitmap& bitmap, const wxColour& colour );
wxMask( const wxBitmap& bitmap, const int paletteIndex );
wxMask( const wxBitmap& bitmap );
~wxMask(void);
private:
friend wxBitmap;
friend wxDC;
friend wxPaintDC;
friend wxToolBarGTK;
GdkBitmap *GetBitmap(void) const;
protected:
GdkBitmap *m_bitmap;
};
//-----------------------------------------------------------------------------
// wxBitmap
//-----------------------------------------------------------------------------
class wxBitmap: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxBitmap)
public:
wxBitmap(void);
wxBitmap( const int width, const int height, const int depth = -1 );
wxBitmap( char **bits );
wxBitmap( const wxBitmap& bmp );
wxBitmap( const wxBitmap* bmp );
wxBitmap( const wxString &filename, const int type );
~wxBitmap(void);
wxBitmap& operator = ( const wxBitmap& bmp );
bool operator == ( const wxBitmap& bmp );
bool operator != ( const wxBitmap& bmp );
bool Ok(void) const;
int GetHeight(void) const;
int GetWidth(void) const;
int GetDepth(void) const;
void SetHeight( const int height );
void SetWidth( const int width );
void SetDepth( const int depth );
wxMask *GetMask(void) const;
void SetMask( wxMask *mask );
bool SaveFile( const wxString &name, const int type, wxPalette *palette = NULL );
bool LoadFile( const wxString &name, const int type );
wxPalette *GetPalette(void) const;
wxPalette *GetColourMap(void) const
{ return GetPalette(); };
private:
friend wxDC;
friend wxPaintDC;
friend wxMemoryDC;
friend wxToolBarGTK;
GdkPixmap *GetPixmap(void) const;
// no data :-)
};
#endif // __GTKBITMAPH__

34
include/wx/gtk/bmpbuttn.h Normal file
View File

@@ -0,0 +1,34 @@
/////////////////////////////////////////////////////////////////////////////
// Name: bmpbutton.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __BMPBUTTONH__
#define __BMPBUTTONH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxBitmapButton;
//-----------------------------------------------------------------------------
// wxBitmapButton
//-----------------------------------------------------------------------------
#endif // __BMPBUTTONH__

60
include/wx/gtk/brush.h Normal file
View File

@@ -0,0 +1,60 @@
/////////////////////////////////////////////////////////////////////////////
// Name: brush.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKBRUSHH__
#define __GTKBRUSHH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/string.h"
#include "wx/gdiobj.h"
#include "wx/bitmap.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxBrush;
//-----------------------------------------------------------------------------
// wxBrush
//-----------------------------------------------------------------------------
class wxBrush: public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxBrush)
public:
wxBrush(void);
wxBrush( const wxColour &colour, const int style );
wxBrush( const wxString &colourName, const int style );
wxBrush( const wxBitmap &stippleBitmap );
wxBrush( const wxBrush &brush );
wxBrush( const wxBrush *brush );
~wxBrush(void);
wxBrush& operator = ( const wxBrush& brush );
bool operator == ( const wxBrush& brush );
bool operator != ( const wxBrush& brush );
bool Ok(void) const;
int GetStyle(void) const;
wxColour &GetColour(void) const;
wxBitmap *GetStipple(void) const;
// no data :-)
};
#endif // __GTKBRUSHH__

58
include/wx/gtk/button.h Normal file
View File

@@ -0,0 +1,58 @@
/////////////////////////////////////////////////////////////////////////////
// Name: button.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKBUTTONH__
#define __GTKBUTTONH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxButton;
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char *wxButtonNameStr;
//-----------------------------------------------------------------------------
// wxButton
//-----------------------------------------------------------------------------
class wxButton: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxButton)
public:
wxButton(void);
wxButton( wxWindow *parent, wxWindowID id, const wxString &label,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const long style = 0, const wxString &name = wxButtonNameStr );
bool Create( wxWindow *parent, wxWindowID id, const wxString &label,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const long style = 0, const wxString &name = wxButtonNameStr );
void SetDefault(void);
void SetLabel( const wxString &label );
wxString GetLabel(void) const;
};
#endif // __GTKBUTTONH__

57
include/wx/gtk/checkbox.h Normal file
View File

@@ -0,0 +1,57 @@
/////////////////////////////////////////////////////////////////////////////
// Name: checkbox.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKCHECKBOXH__
#define __GTKCHECKBOXH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxCheckBox;
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char *wxCheckBoxNameStr;
//-----------------------------------------------------------------------------
// wxCheckBox
//-----------------------------------------------------------------------------
class wxCheckBox: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxCheckBox)
public:
wxCheckBox(void);
wxCheckBox( wxWindow *parent, wxWindowID id, const wxString &label,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const long style = 0, const wxString &name = wxCheckBoxNameStr );
bool Create( wxWindow *parent, wxWindowID id, const wxString &label,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const long style = 0, const wxString &name = wxCheckBoxNameStr );
void SetValue( const bool state );
bool GetValue(void) const;
};
#endif // __GTKCHECKBOXH__

68
include/wx/gtk/choice.h Normal file
View File

@@ -0,0 +1,68 @@
/////////////////////////////////////////////////////////////////////////////
// Name: choice.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKCHOICEH__
#define __GTKCHOICEH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxChoice;
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char *wxChoiceNameStr;
//-----------------------------------------------------------------------------
// wxChoice
//-----------------------------------------------------------------------------
class wxChoice: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxChoice)
public:
wxChoice(void);
wxChoice( wxWindow *parent, const wxWindowID id,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const int n = 0, const wxString choices[] = NULL,
const long style = 0, const wxString &name = wxChoiceNameStr );
bool Create( wxWindow *parent, const wxWindowID id,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const int n = 0, const wxString choices[] = NULL,
const long style = 0, const wxString &name = wxChoiceNameStr );
void Append( const wxString &item );
void Clear(void);
int FindString( const wxString &string ) const;
int GetColumns(void) const;
int GetSelection(void);
wxString GetString( const int n ) const;
wxString GetStringSelection(void) const;
int Number(void) const;
void SetColumns( const int n = 1 );
void SetSelection( const int n );
void SetStringSelection( const wxString &string );
};
#endif // __GTKCHOICEH__

76
include/wx/gtk/colour.h Normal file
View File

@@ -0,0 +1,76 @@
/////////////////////////////////////////////////////////////////////////////
// Name: colour.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKCOLOURH__
#define __GTKCOLOURH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/string.h"
#include "wx/gdiobj.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxDC;
class wxPaintDC;
class wxBitmap;
class wxWindow;
class wxColour;
//-----------------------------------------------------------------------------
// wxColour
//-----------------------------------------------------------------------------
class wxColour: public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxColour)
public:
wxColour(void);
wxColour( char red, char green, char blue );
wxColour( const wxString &colourName );
wxColour( const wxColour& col );
wxColour( const wxColour* col );
~wxColour(void);
wxColour& operator = ( const wxColour& col );
wxColour& operator = ( const wxString& colourName );
bool operator == ( const wxColour& col );
bool operator != ( const wxColour& col );
void Set( const unsigned char red, const unsigned char green, const unsigned char blue );
unsigned char Red(void) const;
unsigned char Green(void) const;
unsigned char Blue(void) const;
bool Ok(void) const;
private:
public:
friend wxDC;
friend wxPaintDC;
friend wxBitmap;
friend wxWindow;
void CalcPixel( GdkColormap *cmap );
int GetPixel(void);
GdkColor *GetColor(void);
// no data :-)
};
#endif // __GTKCOLOURH__

34
include/wx/gtk/combobox.h Normal file
View File

@@ -0,0 +1,34 @@
/////////////////////////////////////////////////////////////////////////////
// Name: combobox.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKCOMBOBOXH__
#define __GTKCOMBOBOXH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxComboBox;
//-----------------------------------------------------------------------------
// wxComboBox
//-----------------------------------------------------------------------------
#endif // __GTKCOMBOBOXH__

51
include/wx/gtk/control.h Normal file
View File

@@ -0,0 +1,51 @@
/////////////////////////////////////////////////////////////////////////////
// Name: control.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKCONTROLH__
#define __GTKCONTROLH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/window.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxControl;
//-----------------------------------------------------------------------------
// wxControl
//-----------------------------------------------------------------------------
class wxControl: public wxWindow
{
DECLARE_DYNAMIC_CLASS(wxControl)
public:
wxControl(void);
wxControl( wxWindow *parent, wxWindowID id,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const long style = 0, const wxString &name = wxPanelNameStr );
virtual void Command( wxCommandEvent &event );
virtual void SetLabel( const wxString &label );
virtual wxString GetLabel(void) const;
wxString m_label;
};
#endif // __GTKCONTROLH__

61
include/wx/gtk/cursor.h Normal file
View File

@@ -0,0 +1,61 @@
/////////////////////////////////////////////////////////////////////////////
// Name: cursor.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKCURSORH__
#define __GTKCURSORH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/gdicmn.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxWindow;
class wxCursor;
//-----------------------------------------------------------------------------
// wxCursor
//-----------------------------------------------------------------------------
class wxCursor: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxCursor)
public:
wxCursor(void);
wxCursor( const int cursorId );
wxCursor( const wxCursor &cursor );
wxCursor( const wxCursor *cursor );
~wxCursor(void);
wxCursor& operator = ( const wxCursor& cursor );
bool operator == ( const wxCursor& cursor );
bool operator != ( const wxCursor& cursor );
bool Ok(void) const;
private:
public:
friend wxWindow;
GdkCursor *GetCursor(void) const;
// no data :-)
};
#endif // __GTKCURSORH__

306
include/wx/gtk/dc.h Normal file
View File

@@ -0,0 +1,306 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dc.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKDCH__
#define __GTKDCH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/gdicmn.h"
#include "wx/pen.h"
#include "wx/brush.h"
#include "wx/icon.h"
#include "wx/font.h"
#include "wx/gdicmn.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxDC;
//-----------------------------------------------------------------------------
// constants
//-----------------------------------------------------------------------------
#define MM_TEXT 0
#define MM_ISOTROPIC 1
#define MM_ANISOTROPIC 2
#define MM_LOMETRIC 3
#define MM_HIMETRIC 4
#define MM_TWIPS 5
#define MM_POINTS 6
#define MM_METRIC 7
//-----------------------------------------------------------------------------
// global variables
//-----------------------------------------------------------------------------
extern int wxPageNumber;
//-----------------------------------------------------------------------------
// wxDC
//-----------------------------------------------------------------------------
class wxDC: public wxObject
{
DECLARE_ABSTRACT_CLASS(wxDC)
public:
wxDC(void);
~wxDC(void);
void BeginDrawing(void) {};
void EndDrawing(void) {};
virtual bool Ok(void) const { return m_ok; };
virtual void FloodFill( long x1, long y1, wxColour *col, int style=wxFLOOD_SURFACE ) = 0;
virtual bool GetPixel( long x1, long y1, wxColour *col ) const = 0;
virtual void DrawLine( long x1, long y1, long x2, long y2 ) = 0;
virtual void CrossHair( long x, long y ) = 0;
virtual void DrawArc( long x1, long y1, long x2, long y2, double xc, double yc );
virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ) = 0;
virtual void DrawPoint( long x, long y ) = 0;
virtual void DrawPoint( wxPoint& point );
virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 ) = 0;
virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 );
virtual void DrawPolygon( int n, wxPoint points[], long xoffset = 0, long yoffset = 0,
int fillStyle=wxODDEVEN_RULE ) = 0;
virtual void DrawPolygon( wxList *lines, long xoffset = 0, long yoffset = 0,
int fillStyle=wxODDEVEN_RULE );
virtual void DrawRectangle( long x, long y, long width, long height ) = 0;
virtual void DrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 ) = 0;
virtual void DrawEllipse( long x, long y, long width, long height ) = 0;
virtual void DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 );
virtual void DrawSpline( wxList *points );
virtual void DrawSpline( int n, wxPoint points[] );
virtual bool CanDrawBitmap(void) const = 0;
virtual void DrawIcon( const wxIcon &icon, long x, long y, bool useMask=FALSE );
void DrawBitmap( const wxBitmap &bmp, long x, long y, bool useMask=FALSE )
{ DrawIcon( *((wxIcon*)(&bmp)), x, y, useMask ); }
virtual bool Blit( long xdest, long ydest, long width, long height,
wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE ) = 0;
virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ) = 0;
virtual bool CanGetTextExtent(void) const = 0;
virtual void GetTextExtent( const wxString &string, long *width, long *height,
long *descent = NULL, long *externalLeading = NULL,
wxFont *theFont = NULL, bool use16 = FALSE ) = 0;
virtual long GetCharWidth(void) = 0;
virtual long GetCharHeight(void) = 0;
virtual void Clear(void) = 0;
virtual void SetFont( const wxFont &font ) = 0;
virtual wxFont *GetFont(void) { return &m_font; };
virtual void SetPen( const wxPen &pen ) = 0;
virtual wxPen *GetPen(void) { return &m_pen; };
virtual void SetBrush( const wxBrush &brush ) = 0;
virtual wxBrush *GetBrush(void) { return &m_brush; };
virtual void SetLogicalFunction( int function ) = 0;
virtual int GetLogicalFunction(void) { return m_logicalFunction; };
virtual void SetTextForeground( const wxColour &col );
virtual void SetTextBackground( const wxColour &col );
virtual wxColour& GetTextBackground(void) const { return (wxColour&)m_textBackgroundColour; };
virtual wxColour& GetTextForeground(void) const { return (wxColour&)m_textForegroundColour; };
virtual void SetBackgroundMode( int mode ) = 0;
virtual int GetBackgroundMode(void) { return m_backgroundMode; };
virtual void SetPalette( const wxPalette& palette ) = 0;
void SetColourMap( const wxPalette& palette ) { SetPalette(palette); };
// the first two must be overridden and called
virtual void SetClippingRegion( long x, long y, long width, long height );
virtual void DestroyClippingRegion(void);
virtual void GetClippingBox( long *x, long *y, long *width, long *height ) const;
virtual inline long MinX(void) const { return m_minX; }
virtual inline long MaxX(void) const { return m_maxX; }
virtual inline long MinY(void) const { return m_minY; }
virtual inline long MaxY(void) const { return m_maxY; }
virtual void GetSize( int* width, int* height ) const;
inline wxSize GetSize(void) const { int w, h; GetSize(&w, &h); return wxSize(w, h); }
virtual void GetSizeMM( long* width, long* height ) const;
virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; };
virtual void EndDoc(void) {};
virtual void StartPage(void) {};
virtual void EndPage(void) {};
virtual void SetMapMode( int mode );
virtual int GetMapMode(void) const { return m_mappingMode; };
virtual void SetUserScale( double x, double y );
virtual void GetUserScale( double *x, double *y );
virtual void SetLogicalScale( double x, double y );
virtual void GetLogicalScale( double *x, double *y );
virtual void SetLogicalOrigin( long x, long y );
virtual void GetLogicalOrigin( long *x, long *y );
virtual void SetDeviceOrigin( long x, long y );
virtual void GetDeviceOrigin( long *x, long *y );
virtual void SetInternalDeviceOrigin( long x, long y );
virtual void GetInternalDeviceOrigin( long *x, long *y );
virtual void SetAxisOrientation( bool xLeftRight, bool yBottomUp );
virtual void SetOptimization( bool WXUNUSED(optimize) ) {};
virtual bool GetOptimization(void) { return m_optimize; };
virtual long DeviceToLogicalX(long x) const;
virtual long DeviceToLogicalY(long y) const;
virtual long DeviceToLogicalXRel(long x) const;
virtual long DeviceToLogicalYRel(long y) const;
virtual long LogicalToDeviceX(long x) const;
virtual long LogicalToDeviceY(long y) const;
virtual long LogicalToDeviceXRel(long x) const;
virtual long LogicalToDeviceYRel(long y) const;
public:
void CalcBoundingBox( long x, long y );
void ComputeScaleAndOrigin(void);
long XDEV2LOG(long x) const
{
long new_x = x - m_deviceOriginX;
if (new_x > 0)
return (long)((double)(new_x) / m_scaleX + 0.5) * m_signX + m_logicalOriginX;
else
return (long)((double)(new_x) / m_scaleX - 0.5) * m_signX + m_logicalOriginX;
}
long XDEV2LOGREL(long x) const
{
if (x > 0)
return (long)((double)(x) / m_scaleX + 0.5);
else
return (long)((double)(x) / m_scaleX - 0.5);
}
long YDEV2LOG(long y) const
{
long new_y = y - m_deviceOriginY;
if (new_y > 0)
return (long)((double)(new_y) / m_scaleY + 0.5) * m_signY + m_logicalOriginY;
else
return (long)((double)(new_y) / m_scaleY - 0.5) * m_signY + m_logicalOriginY;
}
long YDEV2LOGREL(long y) const
{
if (y > 0)
return (long)((double)(y) / m_scaleY + 0.5);
else
return (long)((double)(y) / m_scaleY - 0.5);
}
long XLOG2DEV(long x) const
{
long new_x = x - m_logicalOriginX;
if (new_x > 0)
return (long)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX;
else
return (long)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX;
}
long XLOG2DEVREL(long x) const
{
if (x > 0)
return (long)((double)(x) * m_scaleX + 0.5);
else
return (long)((double)(x) * m_scaleX - 0.5);
}
long YLOG2DEV(long y) const
{
long new_y = y - m_logicalOriginY;
if (new_y > 0)
return (long)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY;
else
return (long)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY;
}
long YLOG2DEVREL(long y) const
{
if (y > 0)
return (long)((double)(y) * m_scaleY + 0.5);
else
return (long)((double)(y) * m_scaleY - 0.5);
}
virtual void DrawOpenSpline( wxList *points ) = 0;
public:
bool m_ok;
bool m_colour;
// not sure, what these mean
bool m_clipping; // Is clipping on right now ?
bool m_isInteractive; // Is GetPixel possible ?
bool m_autoSetting; // wxMSW only ?
bool m_dontDelete; // wxMSW only ?
bool m_optimize; // wxMSW only ?
wxString m_filename; // Not sure where this belongs.
wxPen m_pen;
wxBrush m_brush;
wxBrush m_backgroundBrush;
wxColour m_textForegroundColour;
wxColour m_textBackgroundColour;
wxFont m_font;
int m_logicalFunction;
int m_backgroundMode;
int m_textAlignment; // gone in wxWin 2.0 ?
int m_mappingMode;
// not sure what for, but what is a mm on a screen you don't know the size of?
double m_mm_to_pix_x,m_mm_to_pix_y;
long m_internalDeviceOriginX,m_internalDeviceOriginY; // If un-scrolled is non-zero or
// d.o. changes with scrolling.
// Set using SetInternalDeviceOrigin().
long m_externalDeviceOriginX,m_externalDeviceOriginY; // To be set by external classes
// such as wxScrolledWindow
// using SetDeviceOrigin()
long m_deviceOriginX,m_deviceOriginY; // Sum of the two above.
long m_logicalOriginX,m_logicalOriginY; // User defined.
double m_scaleX,m_scaleY;
double m_logicalScaleX,m_logicalScaleY;
double m_userScaleX,m_userScaleY;
long m_signX,m_signY;
bool m_needComputeScaleX,m_needComputeScaleY; // not yet used
float m_scaleFactor; // wxPSDC wants to have this. Will disappear.
long m_clipX1,m_clipY1,m_clipX2,m_clipY2;
long m_minX,m_maxX,m_minY,m_maxY;
};
#endif // __GTKDCH__

107
include/wx/gtk/dcclient.h Normal file
View File

@@ -0,0 +1,107 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dcclient.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKDCCLIENTH__
#define __GTKDCCLIENTH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/dc.h"
#include "wx/window.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxPaintDC;
typedef wxPaintDC wxClientDC;
typedef wxPaintDC wxWindowDC;
//-----------------------------------------------------------------------------
// wxPaintDC
//-----------------------------------------------------------------------------
class wxPaintDC: public wxDC
{
DECLARE_DYNAMIC_CLASS(wxPaintDC)
public:
wxPaintDC(void);
wxPaintDC( wxWindow *win );
~wxPaintDC(void);
virtual void FloodFill( long x1, long y1, wxColour *col, int style=wxFLOOD_SURFACE );
virtual bool GetPixel( long x1, long y1, wxColour *col ) const;
virtual void DrawLine( long x1, long y1, long x2, long y2 );
virtual void CrossHair( long x, long y );
virtual void DrawArc( long x1, long y1, long x2, long y2, double xc, double yc );
virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea );
virtual void DrawPoint( long x, long y );
virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 );
virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 );
virtual void DrawPolygon( int n, wxPoint points[], long xoffset = 0, long yoffset = 0,
int fillStyle=wxODDEVEN_RULE );
virtual void DrawPolygon( wxList *lines, long xoffset = 0, long yoffset = 0,
int fillStyle=wxODDEVEN_RULE );
virtual void DrawRectangle( long x, long y, long width, long height );
virtual void DrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 );
virtual void DrawEllipse( long x, long y, long width, long height );
virtual bool CanDrawBitmap(void) const;
virtual void DrawIcon( const wxIcon &icon, long x, long y, bool useMask=FALSE );
virtual bool Blit( long xdest, long ydest, long width, long height,
wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE );
virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE );
virtual bool CanGetTextExtent(void) const;
virtual void GetTextExtent( const wxString &string, long *width, long *height,
long *descent = NULL, long *externalLeading = NULL,
wxFont *theFont = NULL, bool use16 = FALSE );
virtual long GetCharWidth(void);
virtual long GetCharHeight(void);
virtual void Clear(void);
virtual void SetFont( const wxFont &font );
virtual void SetPen( const wxPen &pen );
virtual void SetBrush( const wxBrush &brush );
virtual void SetLogicalFunction( int function );
virtual void SetTextForeground( const wxColour &col );
virtual void SetTextBackground( const wxColour &col );
virtual void SetBackgroundMode( int mode );
virtual void SetPalette( const wxPalette& palette );
virtual void SetClippingRegion( long x, long y, long width, long height );
virtual void DestroyClippingRegion(void);
virtual void DrawOpenSpline( wxList *points );
public: // shouldn't be public
GdkWindow *m_window;
GdkGC *m_penGC;
GdkGC *m_brushGC;
GdkGC *m_textGC;
GdkGC *m_bgGC;
GdkColormap *m_cmap;
void SetUpDC(void);
GdkWindow *GetWindow(void);
};
#endif // __GTKDCCLIENTH__

49
include/wx/gtk/dcmemory.h Normal file
View File

@@ -0,0 +1,49 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dcmemory.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKDCMEMORYH__
#define __GTKDCMEMORYH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/dcclient.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxMemoryDC;
//-----------------------------------------------------------------------------
// wxMemoryDC
//-----------------------------------------------------------------------------
class WXDLLEXPORT wxMemoryDC: public wxPaintDC
{
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
public:
wxMemoryDC(void);
wxMemoryDC( wxDC *dc ); // Create compatible DC
~wxMemoryDC(void);
virtual void SelectObject( const wxBitmap& bitmap );
void GetSize( int *width, int *height );
private:
wxBitmap m_selected;
};
#endif
// __GTKDCMEMORYH__

32
include/wx/gtk/dcscreen.h Normal file
View File

@@ -0,0 +1,32 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dcscreen.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKDCSCREENH__
#define __GTKDCSCREENH__
#include "wx/dcclient.h"
class WXDLLEXPORT wxScreenDC: public wxPaintDC
{
DECLARE_DYNAMIC_CLASS(wxScreenDC)
public:
wxScreenDC(void);
~wxScreenDC(void);
static bool StartDrawingOnTop( wxWindow *window );
static bool StartDrawingOnTop( wxRectangle *rect = NULL );
static bool EndDrawingOnTop(void);
};
#endif
// __GTKDCSCREENH__

95
include/wx/gtk/dialog.h Normal file
View File

@@ -0,0 +1,95 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dialog.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKDIALOGH__
#define __GTKDIALOGH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/string.h"
#include "wx/event.h"
#include "wx/window.h"
//-----------------------------------------------------------------------------
// forward decls
//-----------------------------------------------------------------------------
class wxRadioBox;
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxDialog;
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char *wxDialogNameStr;
//-----------------------------------------------------------------------------
// wxDialog
//-----------------------------------------------------------------------------
class wxDialog: public wxWindow
{
DECLARE_DYNAMIC_CLASS(wxDialog)
public:
wxDialog(void);
wxDialog( wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr );
bool Create( wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const long style = wxDEFAULT_DIALOG_STYLE, const wxString &name = wxDialogNameStr );
~wxDialog(void);
void SetTitle(const wxString& title);
wxString GetTitle(void) const;
bool OnClose(void);
void OnApply( wxCommandEvent &event );
void OnCancel( wxCommandEvent &event );
void OnOk( wxCommandEvent &event );
void OnPaint(wxPaintEvent& event);
void OnCloseWindow(wxCloseEvent& event);
/*
void OnCharHook(wxKeyEvent& event);
*/
virtual bool Show( const bool show );
virtual int ShowModal(void);
virtual void EndModal(int retCode);
virtual bool IsModal(void) const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
virtual void InitDialog(void);
/*
void OnOK(wxCommandEvent& event);
void OnApply(wxCommandEvent& event);
void OnCancel(wxCommandEvent& event);
*/
private:
friend wxWindow;
friend wxDC;
friend wxRadioBox;
bool m_modalShowing;
wxString m_title;
DECLARE_EVENT_TABLE()
};
#endif // __GTKDIALOGH__

35
include/wx/gtk/dirdlg.h Normal file
View File

@@ -0,0 +1,35 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dirdlg.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __DIRDIALOGH__
#define __DIRDIALOGH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
#include "wx/dialog.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxDirDialog;
//-----------------------------------------------------------------------------
// wxDirDialog
//-----------------------------------------------------------------------------
#endif // __DIRDIALOGH__

116
include/wx/gtk/dnd.h Normal file
View File

@@ -0,0 +1,116 @@
///////////////////////////////////////////////////////////////////////////////
// Name: dnd.h
// Purpose: declaration of the wxDropTarget class
// Author: Robert Roebling
// RCS-ID:
// Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling
// Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////////
#ifndef __GTKDNDH__
#define __GTKDNDH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/string.h"
#include "wx/cursor.h"
//-------------------------------------------------------------------------
// classes
//-------------------------------------------------------------------------
class wxWindow;
class wxDropTarget;
class wxTextDropTarget;
class wxDragSource;
class wxTextDragSource;
//-------------------------------------------------------------------------
// wxDropTarget
//-------------------------------------------------------------------------
class wxDropTarget: wxObject
{
public:
wxDropTarget();
~wxDropTarget();
virtual void OnEnter() { }
virtual void OnLeave() { }
virtual bool OnDrop( long x, long y, const void *pData ) = 0;
public:
void Drop( GdkEvent *event, int x, int y );
virtual void RegisterWidget( GtkWidget *widget ) = 0;
void UnregisterWidget( GtkWidget *widget );
};
//-------------------------------------------------------------------------
// wxTextDropTarget
//-------------------------------------------------------------------------
class wxTextDropTarget: public wxDropTarget
{
public:
wxTextDropTarget() {};
virtual bool OnDrop( long x, long y, const void *pData );
virtual bool OnDropText( long x, long y, const char *psz );
virtual void RegisterWidget( GtkWidget *widget );
};
//-------------------------------------------------------------------------
// wxDragSource
//-------------------------------------------------------------------------
class wxDragSource: public wxObject
{
public:
wxDragSource( wxWindow *win );
~wxDragSource(void);
void SetData( char *data, const long size );
void Start( int x, int y );
public:
void ConnectWindow(void);
void UnconnectWindow(void);
virtual void RegisterWindow(void) = 0;
void UnregisterWindow(void);
GtkWidget *m_widget;
wxWindow *m_window;
char *m_data;
long m_size;
wxCursor m_defaultCursor;
wxCursor m_goaheadCursor;
};
//-------------------------------------------------------------------------
// wxTextDragSource
//-------------------------------------------------------------------------
class wxTextDragSource: public wxDragSource
{
public:
wxTextDragSource( wxWindow *win ) : wxDragSource(win) {};
void SetTextData( const wxString &text );
void RegisterWindow(void);
private:
wxString m_tmp;
};
#endif
//__GTKDNDH__

93
include/wx/gtk/filedlg.h Normal file
View File

@@ -0,0 +1,93 @@
/////////////////////////////////////////////////////////////////////////////
// Name: filedlg.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKFILEDLGH__
#define __GTKFILEDLGH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/dialog.h"
//-------------------------------------------------------------------------
// File selector
//-------------------------------------------------------------------------
extern const char *wxFileSelectorPromptStr;
extern const char *wxFileSelectorDefaultWildcardStr;
class wxFileDialog: public wxDialog
{
DECLARE_DYNAMIC_CLASS(wxFileDialog)
public:
wxFileDialog() {};
wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr,
const wxString& defaultDir = "", const wxString& defaultFile = "",
const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
long style = 0, const wxPoint& pos = wxDefaultPosition);
inline void SetMessage(const wxString& message) { m_message = message; }
inline void SetPath(const wxString& path) { m_path = path; }
inline void SetDirectory(const wxString& dir) { m_dir = dir; }
inline void SetFilename(const wxString& name) { m_fileName = name; }
inline void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; }
inline void SetStyle(long style) { m_dialogStyle = style; }
inline void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; }
inline wxString GetMessage(void) const { return m_message; }
inline wxString GetPath(void) const { return m_path; }
inline wxString GetDirectory(void) const { return m_dir; }
inline wxString GetFilename(void) const { return m_fileName; }
inline wxString GetWildcard(void) const { return m_wildCard; }
inline long GetStyle(void) const { return m_dialogStyle; }
inline int GetFilterIndex(void) const { return m_filterIndex ; }
int ShowModal(void);
protected:
wxString m_message;
long m_dialogStyle;
wxWindow * m_parent;
wxString m_dir;
wxString m_path; // Full path
wxString m_fileName;
wxString m_wildCard;
int m_filterIndex;
};
#define wxOPEN 1
#define wxSAVE 2
#define wxOVERWRITE_PROMPT 4
#define wxHIDE_READONLY 8
// File selector - backward compatibility
char* wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,
const char *default_filename = NULL, const char *default_extension = NULL,
const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
wxWindow *parent = NULL, int x = -1, int y = -1);
char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL,
wxWindow *parent = NULL);
char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL,
wxWindow *parent = NULL);
#endif
// __GTKFILEDLGH__

120
include/wx/gtk/font.h Normal file
View File

@@ -0,0 +1,120 @@
/////////////////////////////////////////////////////////////////////////////
// Name: font.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKFONTH__
#define __GTKFONTH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/string.h"
#include "wx/hash.h"
#include "wx/gdiobj.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxDC;
class wxPaintDC;
class wxWindow;
class wxFont;
class wxFontNameDirectory;
//-----------------------------------------------------------------------------
// global variables
//-----------------------------------------------------------------------------
// extern wxFontNameDirectory wxTheFontNameDirectory; // defined below
//-----------------------------------------------------------------------------
// wxFont
//-----------------------------------------------------------------------------
class wxFont: public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxFont)
public:
wxFont(void);
wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight,
bool underlined = FALSE, const char *Face=NULL );
wxFont( int PointSize, const char *Face, int Family, int Style, int Weight,
bool underlined = FALSE );
wxFont( const wxFont& font );
wxFont( const wxFont* font );
~wxFont(void);
wxFont& operator = ( const wxFont& font );
bool operator == ( const wxFont& font );
bool operator != ( const wxFont& font );
bool Ok();
int GetPointSize(void) const;
wxString GetFaceName(void) const;
int GetFamily(void) const;
wxString GetFamilyString(void) const;
int GetFontId(void) const;
wxString GetFaceString(void) const;
int GetStyle(void) const;
wxString GetStyleString(void) const;
int GetWeight(void) const;
wxString GetWeightString(void) const;
bool GetUnderlined(void) const;
wxFont( char *xFontName );
private:
friend wxDC;
friend wxPaintDC;
friend wxWindow;
GdkFont* GetInternalFont(float scale = 1.0);
// no data :-)
};
//-----------------------------------------------------------------------------
// wxFontDirectory
//-----------------------------------------------------------------------------
class wxFontNameDirectory: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxFontNameDirectory)
public:
wxFontNameDirectory(void);
~wxFontNameDirectory();
void Initialize(void);
void Initialize(int fontid, int family, const char *name);
int FindOrCreateFontId(const char *name, int family);
char* GetAFMName(int fontid, int weight, int style);
int GetFamily(int fontid);
int GetFontId(const char *name);
char* GetFontName(int fontid);
int GetNewFontId(void);
char* GetPostScriptName(int fontid, int weight, int style);
char* GetScreenName(int fontid, int weight, int style);
class wxHashTable *table;
int nextFontId;
};
extern wxFontNameDirectory wxTheFontNameDirectory;
#endif // __GTKFONTH__

90
include/wx/gtk/frame.h Normal file
View File

@@ -0,0 +1,90 @@
/////////////////////////////////////////////////////////////////////////////
// Name: frame.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKFRAMEH__
#define __GTKFRAMEH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/window.h"
#include "wx/menu.h"
#include "wx/statusbr.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxRadioBox;
class wxFrame;
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char *wxFrameNameStr;
//-----------------------------------------------------------------------------
// wxFrame
//-----------------------------------------------------------------------------
class wxFrame: public wxWindow
{
DECLARE_DYNAMIC_CLASS(wxFrame)
public:
wxFrame(void);
wxFrame( wxWindow *parent, const wxWindowID id, const wxString &title,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
bool Create( wxWindow *parent, const wxWindowID id, const wxString &title,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const long style = wxDEFAULT_FRAME_STYLE, const wxString &name = wxFrameNameStr );
~wxFrame(void);
bool Destroy(void);
void OnCloseWindow( wxCloseEvent& event );
virtual bool Show( const bool show );
virtual void Enable( const bool enable );
virtual void GetClientSize( int *width, int *height ) const;
void OnSize( wxSizeEvent &event );
void SetMenuBar( wxMenuBar *menuBar );
virtual bool CreateStatusBar( const int number = 1 );
virtual void SetStatusText( const wxString &text, const int number = 0 );
virtual void SetStatusWidths( const int n, const int *width );
wxStatusBar *GetStatusBar(void);
wxMenuBar *GetMenuBar(void);
void SetTitle( const wxString &title );
wxString GetTitle(void) const;
void OnActivate( wxActivateEvent &WXUNUSED(event) ) {};
void GtkOnSize( int width, int height );
private:
friend wxWindow;
GtkWidget *m_mainWindow;
wxMenuBar *m_frameMenuBar;
wxStatusBar *m_frameStatusBar;
bool m_doingOnSize;
wxString m_title;
DECLARE_EVENT_TABLE()
};
#endif // __GTKFRAMEH__

34
include/wx/gtk/gauge.h Normal file
View File

@@ -0,0 +1,34 @@
/////////////////////////////////////////////////////////////////////////////
// Name: gauge.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKGAUGEH__
#define __GTKGAUGEH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxGauge;
//-----------------------------------------------------------------------------
// wxGaugeBox
//-----------------------------------------------------------------------------
#endif // __GTKGAUGEH__

37
include/wx/gtk/gdiobj.h Normal file
View File

@@ -0,0 +1,37 @@
/////////////////////////////////////////////////////////////////////////////
// Name: gdiobj.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GDIOBJH__
#define __GDIOBJH__
#include "wx/object.h"
#ifdef __GNUG__
#pragma interface
#endif
class WXDLLEXPORT wxGDIObject: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxGDIObject)
public:
inline wxGDIObject(void) { m_visible = FALSE; };
inline ~wxGDIObject(void) {};
virtual bool GetVisible(void) { return m_visible; }
virtual void SetVisible(bool v) { m_visible = v; }
protected:
bool m_visible; // Can a pointer to this object be safely taken?
// - only if created within FindOrCreate...
};
#endif
// __GDIOBJH__

53
include/wx/gtk/icon.h Normal file
View File

@@ -0,0 +1,53 @@
/////////////////////////////////////////////////////////////////////////////
// Name: icon.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKICONH__
#define __GTKICONH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/bitmap.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxIcon;
//-----------------------------------------------------------------------------
// wxIcon
//-----------------------------------------------------------------------------
class wxIcon: public wxBitmap
{
DECLARE_DYNAMIC_CLASS(wxIcon)
public:
wxIcon(void) {};
inline wxIcon(const wxIcon& icon) { Ref(icon); }
inline wxIcon(const wxIcon* icon) { if (icon) Ref(*icon); }
wxIcon( char **bits, const int WXUNUSED(width), const int WXUNUSED(height) ) :
wxBitmap( bits ) {};
inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }
inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; }
};
#endif // __GTKICONH__

85
include/wx/gtk/listbox.h Normal file
View File

@@ -0,0 +1,85 @@
/////////////////////////////////////////////////////////////////////////////
// Name: listbox.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKLISTBOXH__
#define __GTKLISTBOXH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxListBox;
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char *wxListBoxNameStr;
//-----------------------------------------------------------------------------
// wxListBox
//-----------------------------------------------------------------------------
class wxListBox: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxListBox)
public:
wxListBox(void);
wxListBox( wxWindow *parent, wxWindowID id,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const int n = 0, const wxString choices[] = NULL,
const long style = 0, const wxString &name = wxListBoxNameStr );
bool Create( wxWindow *parent, wxWindowID id,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const int n = 0, const wxString choices[] = NULL,
const long style = 0, const wxString &name = wxListBoxNameStr );
void Append( const wxString &item );
void Append( const wxString &item, char *clientData );
void Clear(void);
void Delete( int n );
void Deselect( int n );
int FindString( const wxString &item ) const;
char *GetClientData( const int n ) const;
int GetSelection(void) const;
int GetSelections( int **selections ) const;
wxString GetString( int n ) const;
wxString GetStringSelection(void) const;
int Number(void);
bool Selected( const int n );
void Set( const int n, const wxString *choices );
void SetClientData( const int n, char *clientData );
void SetFirstItem( int n );
void SetFirstItem( const wxString &item );
void SetSelection( const int n, const bool select = TRUE );
void SetString( const int n, const wxString &string );
void SetStringSelection( const wxString &string, const bool select = TRUE );
private:
GtkList *m_list;
public:
int GetIndex( GtkWidget *item ) const;
};
#endif // __GTKLISTBOXH__

146
include/wx/gtk/mdi.h Normal file
View File

@@ -0,0 +1,146 @@
/////////////////////////////////////////////////////////////////////////////
// Name: mdi.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __MDIH__
#define __MDIH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
#include "wx/panel.h"
#include "wx/frame.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxMDIParentFrame;
class wxMDIClientWindow;
class wxMDIChildFrame;
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char* wxFrameNameStr;
extern const char* wxStatusLineNameStr;
//-----------------------------------------------------------------------------
// wxMDIParentFrame
//-----------------------------------------------------------------------------
class wxMDIParentFrame: public wxFrame
{
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
friend class wxMDIChildFrame;
public:
wxMDIParentFrame(void);
wxMDIParentFrame( wxWindow *parent,
const wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
const long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
const wxString& name = wxFrameNameStr );
~wxMDIParentFrame(void);
bool Create( wxWindow *parent,
const wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
const long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
const wxString& name = wxFrameNameStr );
void OnSize( wxSizeEvent& event );
void OnActivate( wxActivateEvent& event );
void SetMenuBar( wxMenuBar *menu_bar );
void GetClientSize(int *width, int *height) const;
wxMDIChildFrame *GetActiveChild(void) const;
wxMDIClientWindow *GetClientWindow(void) const;
virtual wxMDIClientWindow *OnCreateClient(void);
virtual void Cascade(void) {};
virtual void Tile(void) {};
virtual void ArrangeIcons(void) {};
virtual void ActivateNext(void);
virtual void ActivatePrevious(void);
void OnSysColourChanged(wxSysColourChangedEvent& event);
protected:
wxMDIClientWindow * m_clientWindow;
wxMDIChildFrame * m_currentChild;
bool m_parentFrameActive;
// DECLARE_EVENT_TABLE()
};
//-----------------------------------------------------------------------------
// wxMDIChildFrame
//-----------------------------------------------------------------------------
class wxMDIChildFrame: public wxPanel
{
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
public:
wxMDIChildFrame(void);
wxMDIChildFrame( wxMDIParentFrame *parent,
const wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
const long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr );
~wxMDIChildFrame(void);
bool Create( wxMDIParentFrame *parent,
const wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
const long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr );
void SetMenuBar( wxMenuBar *menu_bar );
// no status bars in wxGTK
virtual bool CreateStatusBar( const int WXUNUSED(number) = 1 ) { return FALSE; };
virtual void SetStatusText( const wxString &WXUNUSED(text), const int WXUNUSED(number) ) {};
virtual void SetStatusWidths( const int WXUNUSED(n), const int *WXUNUSED(width) ) {};
virtual void Maximize(void) {};
virtual void Restore(void) {};
virtual void Activate(void);
public:
wxString m_title;
};
//-----------------------------------------------------------------------------
// wxMDIClientWindow
//-----------------------------------------------------------------------------
class wxMDIClientWindow: public wxWindow
{
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
public:
wxMDIClientWindow(void);
wxMDIClientWindow( wxMDIParentFrame *parent, const long style = 0 );
~wxMDIClientWindow(void);
virtual bool CreateClient( wxMDIParentFrame *parent, const long style = wxVSCROLL | wxHSCROLL );
void AddChild( wxWindow *child );
};
#endif // __MDIH__

107
include/wx/gtk/menu.h Normal file
View File

@@ -0,0 +1,107 @@
/////////////////////////////////////////////////////////////////////////////
// Name: menu.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKMENUH__
#define __GTKMENUH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/window.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxMenuBar;
class wxMenuItem;
class wxMenu;
//-----------------------------------------------------------------------------
// wxMenuBar
//-----------------------------------------------------------------------------
class wxMenuBar: public wxWindow
{
DECLARE_DYNAMIC_CLASS(wxMenuBar)
public:
wxMenuBar(void);
void Append( wxMenu *menu, const wxString &title );
int FindMenuItem( const wxString &menuString, const wxString &itemString ) const;
wxList m_menus;
GtkWidget *m_menubar;
};
//-----------------------------------------------------------------------------
// wxMenu
//-----------------------------------------------------------------------------
class wxMenuItem: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxMenuItem)
public:
wxMenuItem(void);
int m_id;
wxString m_text;
bool m_isCheckMenu;
bool m_checked;
bool m_isSubMenu;
bool m_isEnabled;
wxMenu *m_subMenu;
wxString m_helpStr;
GtkWidget *m_menuItem; // GtkMenuItem
};
class wxMenu: public wxEvtHandler
{
DECLARE_DYNAMIC_CLASS(wxMenu)
public:
wxMenu( const wxString &title = "" );
void AppendSeparator(void);
void Append( const int id, const wxString &item,
const wxString &helpStr = "", const bool checkable = FALSE );
void Append( const int id, const wxString &item,
wxMenu *subMenu, const wxString &helpStr = "" );
int FindItem( const wxString itemString ) const;
void Break(void) {};
void Enable( const int id, const bool enable );
bool Enabled( const int id ) const;
void SetLabel( const int id, const wxString &label );
public:
int FindMenuIdByMenuItem( GtkWidget *menuItem ) const;
void SetInvokingWindow( wxWindow *win );
wxWindow *GetInvokingWindow(void);
wxString m_title;
wxList m_items;
wxWindow *m_invokingWindow;
GtkWidget *m_menu; // GtkMenu
};
#endif // __GTKMENUH__

60
include/wx/gtk/palette.h Normal file
View File

@@ -0,0 +1,60 @@
/////////////////////////////////////////////////////////////////////////////
// Name: palette.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKPALETTEH__
#define __GTKPALETTEH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxPalette;
//-----------------------------------------------------------------------------
// wxPalette
//-----------------------------------------------------------------------------
class wxPalette: public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxPalette)
public:
wxPalette(void);
wxPalette( const int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue );
wxPalette( const wxPalette& palette );
wxPalette( const wxPalette* palette );
~wxPalette(void);
wxPalette& operator = ( const wxPalette& palette );
bool operator == ( const wxPalette& palette );
bool operator != ( const wxPalette& palette );
bool Ok(void) const;
bool Create( const int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const;
bool GetRGB( const int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const;
// no data
};
#define wxColorMap wxPalette
#define wxColourMap wxPalette
#endif // __GTKPALETTEH__

68
include/wx/gtk/pen.h Normal file
View File

@@ -0,0 +1,68 @@
/////////////////////////////////////////////////////////////////////////////
// Name: pen.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKPENH__
#define __GTKPENH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/string.h"
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxPen;
//-----------------------------------------------------------------------------
// wxPen
//-----------------------------------------------------------------------------
class wxPen: public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxPen)
public:
wxPen(void);
wxPen( const wxColour &colour, int width, int style );
wxPen( const wxString &colourName, int width, int style );
wxPen( const wxPen& pen );
wxPen( const wxPen* pen );
~wxPen(void);
wxPen& operator = ( const wxPen& pen );
bool operator == ( const wxPen& pen );
bool operator != ( const wxPen& pen );
void SetColour( const wxColour &colour );
void SetColour( const wxString &colourName );
void SetColour( const int red, const int green, const int blue );
void SetCap( int capStyle );
void SetJoin( int joinStyle );
void SetStyle( int style );
void SetWidth( int width );
wxColour &GetColour(void) const;
int GetCap(void) const;
int GetJoin(void) const;
int GetStyle(void) const;
int GetWidth(void) const;
bool Ok(void) const;
// no data :-)
};
#endif // __GTKPENH__

84
include/wx/gtk/radiobox.h Normal file
View File

@@ -0,0 +1,84 @@
/////////////////////////////////////////////////////////////////////////////
// Name: radiobox.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKRADIOBOXH__
#define __GTKRADIOBOXH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
#include "wx/bitmap.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxRadioBox;
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char *wxRadioBoxNameStr;
//-----------------------------------------------------------------------------
// wxRadioBox
//-----------------------------------------------------------------------------
class wxRadioBox: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxRadioBox)
public:
wxRadioBox(void);
wxRadioBox( wxWindow *parent, const wxWindowID id, const wxString& title,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const int n = 0, const wxString choices[] = NULL,
const int majorDim = 0, const long style = wxRA_HORIZONTAL,
const wxString &name = wxRadioBoxNameStr );
bool Create( wxWindow *parent, const wxWindowID id, const wxString& title,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const int n = 0, const wxString choices[] = NULL,
const int majorDim = 0, const long style = wxRA_HORIZONTAL,
const wxString &name = wxRadioBoxNameStr );
int FindString( const wxString& s) const;
void SetSelection( const int n );
int GetSelection(void) const;
wxString GetString( const int n ) const;
wxString GetLabel(void) const;
void SetLabel( const wxString& label );
void SetLabel( const int item, const wxString& label );
void SetLabel( const int item, wxBitmap *bitmap );
wxString GetLabel( const int item ) const;
bool Show( const bool show );
void Enable( const bool enable );
void Enable( const int item, const bool enable );
void Show( const int item, const bool show );
virtual wxString GetStringSelection(void) const;
virtual bool SetStringSelection( const wxString& s );
virtual int Number(void) const;
int GetNumberOfRowsOrCols(void) const;
void SetNumberOfRowsOrCols( const int n );
private:
GtkRadioButton *m_radio;
};
#endif // __GTKRADIOBOXH__

31
include/wx/gtk/radiobut.h Normal file
View File

@@ -0,0 +1,31 @@
/////////////////////////////////////////////////////////////////////////////
// Name: radiobut.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKRADIOBUTTONH__
#define __GTKRADIOBUTTONH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxRadioButton;
#endif // __GTKRADIOBUTTONH__

99
include/wx/gtk/region.h Normal file
View File

@@ -0,0 +1,99 @@
/////////////////////////////////////////////////////////////////////////////
// Name: region.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __REGIONH__
#define __REGIONH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/list.h"
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxRegion;
//-----------------------------------------------------------------------------
// constants
//-----------------------------------------------------------------------------
enum wxRegionContain
{
wxOutRegion = 0, wxPartRegion = 1, wxInRegion = 2
};
// So far, for internal use only
enum wxRegionOp {
wxRGN_AND, // Creates the intersection of the two combined regions.
wxRGN_COPY, // Creates a copy of the region identified by hrgnSrc1.
wxRGN_DIFF, // Combines the parts of hrgnSrc1 that are not part of hrgnSrc2.
wxRGN_OR, // Creates the union of two combined regions.
wxRGN_XOR // Creates the union of two combined regions except for any overlapping areas.
};
//-----------------------------------------------------------------------------
// wxRegion
//-----------------------------------------------------------------------------
class wxRegion : public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxRegion);
public:
wxRegion( long x, long y, long w, long h );
wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight );
wxRegion( const wxRect& rect );
wxRegion(void);
~wxRegion(void);
inline wxRegion( const wxRegion& r )
{ Ref(r); }
inline wxRegion& operator = ( const wxRegion& r )
{ Ref(r); return (*this); }
void Clear(void);
bool Union( long x, long y, long width, long height );
bool Union( const wxRect& rect );
bool Union( const wxRegion& region );
bool Intersect( long x, long y, long width, long height );
bool Intersect( const wxRect& rect );
bool Intersect( const wxRegion& region );
bool Subtract( long x, long y, long width, long height );
bool Subtract( const wxRect& rect );
bool Subtract( const wxRegion& region );
bool Xor( long x, long y, long width, long height );
bool Xor( const wxRect& rect );
bool Xor( const wxRegion& region );
void GetBox( long& x, long& y, long&w, long &h ) const;
wxRect GetBox(void) const ;
bool Empty(void) const;
wxRegionContain Contains( long x, long y ) const;
wxRegionContain Contains( long x, long y, long w, long h ) const;
public:
GdkRegion *GetRegion(void) const;
};
#endif
// __REGIONH__

82
include/wx/gtk/scrolbar.h Normal file
View File

@@ -0,0 +1,82 @@
/////////////////////////////////////////////////////////////////////////////
// Name: scrolbar.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKSCROLLBARH__
#define __GTKSCROLLBARH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxScrollBar;
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char *wxScrollBarNameStr;
//-----------------------------------------------------------------------------
// wxScrollBar
//-----------------------------------------------------------------------------
class wxScrollBar: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxScrollBar)
public:
wxScrollBar(void) { m_adjust = NULL; m_oldPos = 0.0; };
wxScrollBar(wxWindow *parent, const wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const long style = wxSB_HORIZONTAL,
const wxString& name = wxScrollBarNameStr );
~wxScrollBar(void);
bool Create(wxWindow *parent, const wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const long style = wxSB_HORIZONTAL,
const wxString& name = wxScrollBarNameStr);
int GetPosition(void) const;
int GetThumbSize() const;
int GetPageSize() const;
int GetRange() const;
virtual void SetPosition( const int viewStart );
virtual void SetScrollbar( const int position, const int thumbSize, const int range, const int pageSize,
const bool refresh = TRUE );
// Backward compatibility
int GetValue(void) const;
void SetValue( const int viewStart );
void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const;
int GetViewLength() const;
int GetObjectLength() const;
void SetPageSize( const int pageLength );
void SetObjectLength( const int objectLength );
void SetViewLength( const int viewLength );
public:
GtkAdjustment *m_adjust;
float m_oldPos;
};
#endif
// __GTKSCROLLBARH__

40
include/wx/gtk/settings.h Normal file
View File

@@ -0,0 +1,40 @@
/////////////////////////////////////////////////////////////////////////////
// Name: settings.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKSETTINGSH__
#define __GTKSETTINGSH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/gdicmn.h"
#include "wx/pen.h"
#include "wx/font.h"
class WXDLLEXPORT wxSystemSettings: public wxObject
{
public:
inline wxSystemSettings(void) {}
// Get a system colour
static wxColour GetSystemColour(int index);
// Get a system font
static wxFont GetSystemFont(int index);
// Get a system metric, e.g. scrollbar size
static int GetSystemMetric(int index);
};
#endif
// __GTKSETTINGSH__

534
include/wx/gtk/setup.h Normal file
View File

@@ -0,0 +1,534 @@
/* include/wx/gtk/setup.h. Generated automatically by configure. */
/* wx_setup.h
This file is in the public domain.
Descriptive text for the C preprocessor macros that
the distributed Autoconf macros can define.
No software package will use all of them; autoheader copies the ones
your configure.in uses into your configuration header file templates.
The entries are in sort -df order: alphabetical, case insensitive,
ignoring punctuation (such as underscores). Although this order
can split up related entries, it makes it easier to check whether
a given entry is in the file.
Leave the following blank line there!! Autoheader needs it. */
#ifndef __GTKSETUPH__
#define __GTKSETUPH__
#ifdef __GNUG__
#pragma interface
#endif
/* define the system to compile */
#define __GTK__ 1
#define __UNIX__ 1
#define __LINUX__ 1
/* #undef __SGI__ */
/* #undef __HPUX__ */
/* #undef __SYSV__ */
/* #undef __SVR4__ */
/* #undef __AIX__ */
/* #undef __SUN__ */
/* #undef __SOLARIS__ */
/* #undef __SUNOS__ */
/* #undef __ALPHA__ */
/* #undef __OSF__ */
/* #undef __BSD__ */
/* #undef __FREEBSD__ */
/* #undef __VMS__ */
/* #undef __ULTRIX__ */
/* #undef __DATA_GENERAL__ */
/*
* Use zlib
*/
#define USE_ZLIB 1
/*
* Use gdk_imlib
*/
#define USE_GDK_IMLIB 1
/*
* Use libpng
*/
#define USE_LIBPNG 1
/*
* Use Threads
*/
/* #undef USE_THREADS */
/* #undef USE_THREADS_POSIX */
/* #undef USE_THREADS_SGI */
/*
* Use storable classes
*/
#define USE_STORABLE_CLASSES 1
/*
* Use automatic translation via gettext() in wxTString
*/
#define USE_AUTOTRANS 1
/*
* Use font metric files in GetTextExtent for wxPostScriptDC
* Use consistent PostScript fonts for AFM and printing (!)
*/
#define USE_AFM_FOR_POSTSCRIPT 1
#define WX_NORMALIZED_PS_FONTS 1
/*
* Use clipboard
*/
/* #undef USE_CLIPBOARD */
/*
* Use wxWindows layout constraint system
*/
#define USE_CONSTRAINTS 1
/*
* Use the document/view architecture
*/
#define USE_DOC_VIEW_ARCHITECTURE 1
/*
* Use enhanced dialog
*/
/* #undef USE_ENHANCED_DIALOG */
/*
* Use Form panel item placement
*/
/* #undef USE_FORM */
/*
* Use fraction class
*/
#define USE_FRACTION 1
/*
* Use gauge item
*/
#define USE_GAUGE 1
/*
* Implement a GLCanvas class as an interface to OpenGL, using the GLX
* extension to the X11 protocol. You can use the (free) Mesa library
* if you don't have a 'real' OpenGL.
*/
#define USE_GLX 0
/*
* Use wxWindows help facility (needs USE_IPC 1)
*/
/* #undef USE_HELP */
/*
* Use iostream.h rather than iostream
*/
#define USE_IOSTREAMH 1
/*
* Use Interprocess communication
*/
#define USE_IPC 1
/*
* Use Metafile and Metafile device context
*/
/* #undef USE_METAFILE */
/*
* Use PostScript device context
*/
#define USE_POSTSCRIPT 1
/*
* Use the print/preview architecture
*/
#define USE_PRINTING_ARCHITECTURE 1
/*
* Use Prolog IO
*/
/* #undef USE_PROLOGIO */
/*
* Use Remote Procedure Call (Needs USE_IPC and USE_PROLOGIO)
*/
/* #undef USE_RPC */
/*
* Use wxGetResource & wxWriteResource (change .Xdefaults)
*/
#define USE_RESOURCES 1
/*
* Use scrollbar item
*/
#define USE_SCROLLBAR 1
/*
* Use time and date classes
*/
#define USE_TIMEDATE 1
/*
* Use toolbar, use Xt port toolbar (3D look)
*/
#define USE_TOOLBAR 1
#define USE_XT_TOOLBAR
/*
* Enables old type checking mechanism (wxSubType)
*/
/* #undef USE_TYPETREE */
/*
* Use virtual list box item
*/
/* #undef USE_VLBOX */
/*
* Use wxWindows resource loading (.wxr-files) (Needs USE_PROLOGIO 1)
*/
#define USE_WX_RESOURCES 1
/*
* Use wxGraph
*/
/* #undef USE_WXGRAPH */
/*
* Use wxTree
*/
/********************** DO NOT CHANGE BELOW THIS POINT **********************/
/**************************** DEBUGGING FEATURES ****************************/
/* Compatibility with 1.66 API.
Level 0: no backward compatibility, all new features
Level 1: wxDC, OnSize (etc.) compatibility, but
some new features such as event tables */
#define WXWIN_COMPATIBILITY 1
/*
* Enables debugging: memory tracing, assert, etc.
*/
/* #undef DEBUG */
/*
* Enables debugging version of wxObject::new and wxObject::delete (IF DEBUG)
* WARNING: this code may not work with all architectures, especially
* if alignment is an issue.
*/
/* #undef USE_MEMORY_TRACING */
/*
* Enable debugging version of global memory operators new and delete
* Disable it, If this causes problems (e.g. link errors)
*/
/* #undef USE_GLOBAL_MEMORY_OPERATORS */
/*
* If WXDEBUG && USE_MEMORY_TRACING && USE_GLOBAL_MEMORY_OPERATORS
* used to debug the memory allocation of wxWindows Xt port code
*/
#define USE_INTERNAL_MEMORY_TRACING 0
/*
* Matthews garbage collection (used for MrEd?)
*/
#define WXGARBAGE_COLLECTION_ON 0
/**************************** COMPILER FEATURES *****************************/
/*
* Disable this if your compiler can't cope
* with omission of prototype parameters.
*/
#define REMOVE_UNUSED_ARG 1
/*
* The const keyword is being introduced more in wxWindows.
* You can use this setting to maintain backward compatibility.
* If 0: will use const wherever possible.
* If 1: will use const only where necessary
* for precompiled headers to work.
* If 2: will be totally backward compatible, but precompiled
* headers may not work and program size will be larger.
*/
#define CONST_COMPATIBILITY 0
/************************ WINDOWS 3.1 COMPATIBILITY *************************/
/*
* Normalize X drawing code to behave exactly as MSW.
*/
#define WX_STANDARD_GRAPHICS 0
/******************* other stuff **********************************/
/*
* Support image loading for wxBitmap (wxImage is needed for this)
*/
#define USE_IMAGE_LOADING 0
#define WXIMAGE_INCLUDE "../../utils/image/src/wx_image.h"
/*
* Use splines
*/
#define USE_SPLINES 1
/*
* USE_DYNAMIC_CLASSES is TRUE for the Xt port
*/
#define USE_DYNAMIC_CLASSES 1
/*
* USE_EXTENDED_STATICS is FALSE for the Xt port
*/
#define USE_EXTENDED_STATICS 0
/*************************** IMAKEFILE EVALUATIOS ***************************/
#if USE_XPM
#define USE_XPM_IN_X 1
#else
#define USE_XPM_IN_X 0
#endif
#if USE_IMAGE_LOADING
#define USE_IMAGE_LOADING_IN_X 1
#else
#define USE_IMAGE_LOADING_IN_X 0
#endif
/* here comes the system-specific stuff */
/* acconfig.h
This file is in the public domain.
Descriptive text for the C preprocessor macros that
the distributed Autoconf macros can define.
No software package will use all of them; autoheader copies the ones
your configure.in uses into your configuration header file templates.
The entries are in sort -df order: alphabetical, case insensitive,
ignoring punctuation (such as underscores). Although this order
can split up related entries, it makes it easier to check whether
a given entry is in the file. */
/* Define if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
/* #undef _ALL_SOURCE */
#endif
/* Define if using alloca.c. */
/* #undef C_ALLOCA */
/* Define if type char is unsigned and you are not using gcc. */
#ifndef __CHAR_UNSIGNED__
/* #undef __CHAR_UNSIGNED__ */
#endif
/* Define if the closedir function returns void instead of int. */
/* #undef CLOSEDIR_VOID */
/* Define to empty if the keyword does not work. */
/* #undef const */
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
/* #undef CRAY_STACKSEG_END */
/* Define for DGUX with <sys/dg_sys_info.h>. */
/* #undef DGUX */
/* Define if you have <dirent.h>. */
/* #undef DIRENT */
/* Define to the type of elements in the array set by `getgroups'.
Usually this is either `int' or `gid_t'. */
#define GETGROUPS_T gid_t
/* Define if the `getloadavg' function needs to be run setuid or setgid. */
/* #undef GETLOADAVG_PRIVILEGED */
/* Define if the `getpgrp' function takes no argument. */
/* #undef GETPGRP_VOID */
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef gid_t */
/* Define if you have alloca, as a function or macro. */
/* #undef HAVE_ALLOCA */
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
/* #undef HAVE_ALLOCA_H */
/* Define if you don't have vprintf but do have _doprnt. */
/* #undef HAVE_DOPRNT */
/* Define if your system has its own `getloadavg' function. */
/* #undef HAVE_GETLOADAVG */
/* Define if you have the getmntent function. */
/* #undef HAVE_GETMNTENT */
/* Define if the `long double' type works. */
#define HAVE_LONG_DOUBLE 1
/* Define if you support file names longer than 14 characters. */
#define HAVE_LONG_FILE_NAMES 1
/* Define if you have a working `mmap' system call. */
/* #undef HAVE_MMAP */
/* Define if system calls automatically restart after interruption
by a signal. */
/* #undef HAVE_RESTARTABLE_SYSCALLS */
/* Define if your struct stat has st_blksize. */
#define HAVE_ST_BLKSIZE 1
/* Define if your struct stat has st_blocks. */
#define HAVE_ST_BLOCKS 1
/* Define if you have the strcoll function and it is properly defined. */
/* #undef HAVE_STRCOLL */
/* Define if your struct stat has st_rdev. */
#define HAVE_ST_RDEV 1
/* Define if you have the strftime function. */
/* #undef HAVE_STRFTIME */
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#define HAVE_SYS_WAIT_H 1
/* Define if your struct tm has tm_zone. */
/* #undef HAVE_TM_ZONE */
/* Define if you don't have tm_zone but do have the external array
tzname. */
#define HAVE_TZNAME 1
/* Define if you have <unistd.h>. */
/* #undef HAVE_UNISTD_H */
/* Define if utime(file, NULL) sets file's timestamp to the present. */
/* #undef HAVE_UTIME_NULL */
/* Define if you have <vfork.h>. */
/* #undef HAVE_VFORK_H */
/* Define if you have the vprintf function. */
/* #undef HAVE_VPRINTF */
/* Define if you have the wait3 system call. */
/* #undef HAVE_WAIT3 */
/* Define as __inline if that's what the C compiler calls it. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define if major, minor, and makedev are declared in <mkdev.h>. */
/* #undef MAJOR_IN_MKDEV */
/* Define if major, minor, and makedev are declared in <sysmacros.h>. */
/* #undef MAJOR_IN_SYSMACROS */
/* Define if on MINIX. */
/* #undef _MINIX */
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef mode_t */
/* Define if you don't have <dirent.h>, but have <ndir.h>. */
/* #undef NDIR */
/* Define if you have <memory.h>, and <string.h> doesn't declare the
mem* functions. */
/* #undef NEED_MEMORY_H */
/* Define if your struct nlist has an n_un member. */
/* #undef NLIST_NAME_UNION */
/* Define if you have <nlist.h>. */
/* #undef NLIST_STRUCT */
/* Define if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
/* Define to `long' if <sys/types.h> doesn't define. */
/* #undef off_t */
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef pid_t */
/* Define if the system does not provide POSIX.1 features except
with this defined. */
/* #undef _POSIX_1_SOURCE */
/* Define if you need to in order for stat and other things to work. */
/* #undef _POSIX_SOURCE */
/* Define as the return type of signal handlers (int or void). */
#define RETSIGTYPE void
/* Define if the setvbuf function takes the buffering type as its second
argument and the buffer pointer as the third, as on System V
before release 3. */
/* #undef SETVBUF_REVERSED */
/* Define SIZESOF for some Objects */
#define SIZEOF_INT 4
#define SIZEOF_INT_P 4
#define SIZEOF_LONG 4
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
/* #undef STACK_DIRECTION */
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
/* #undef STAT_MACROS_BROKEN */
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define on System V Release 4. */
/* #undef SVR4 */
/* Define on BSD */
/* #undef BSD */
/* Define on System V */
/* #undef SYSV */
/* Define if you don't have <dirent.h>, but have <sys/dir.h>. */
/* #undef SYSDIR */
/* Define if you don't have <dirent.h>, but have <sys/ndir.h>. */
/* #undef SYSNDIR */
/* Define if `sys_siglist' is declared by <signal.h>. */
/* #undef SYS_SIGLIST_DECLARED */
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Define if your <sys/time.h> declares struct tm. */
/* #undef TM_IN_SYS_TIME */
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef uid_t */
/* Define for Encore UMAX. */
/* #undef UMAX */
/* Define for Encore UMAX 4.3 that has <inq_status/cpustats.h>
instead of <sys/cpustats.h>. */
/* #undef UMAX4_3 */
/* Define if you do not have <strings.h>, index, bzero, etc.. */
/* #undef USG */
/* Define if the system is System V Release 4 */
/* #undef SVR4 */
/* Define vfork as fork if vfork does not work. */
/* #undef vfork */
/* Define if the closedir function returns void instead of int. */
/* #undef VOID_CLOSEDIR */
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
/* Define if lex declares yytext as a char * by default, not a char[]. */
#define YYTEXT_POINTER 1
#endif /* __GTKSETUPH__ */
/* Leave that blank line there!! Autoheader needs it.
If you're adding to this file, keep in mind:
The entries are in sort -df order: alphabetical, case insensitive,
ignoring punctuation (such as underscores). */

91
include/wx/gtk/slider.h Normal file
View File

@@ -0,0 +1,91 @@
/////////////////////////////////////////////////////////////////////////////
// Name: slider.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKSLIDERH__
#define __GTKSLIDERH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxSlider;
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char *wxSliderNameStr;
//-----------------------------------------------------------------------------
// wxSlider
//-----------------------------------------------------------------------------
class wxSlider: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxSlider)
public:
wxSlider(void);
wxSlider( wxWindow *parent, const wxWindowID id,
const int value, const int minValue, const int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const long style = wxSL_HORIZONTAL,
/* const wxValidator& validator = wxDefaultValidator, */
const wxString& name = wxSliderNameStr);
~wxSlider(void);
bool Create(wxWindow *parent, const wxWindowID id,
const int value, const int minValue, const int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const long style = wxSL_HORIZONTAL,
/* const wxValidator& validator = wxDefaultValidator, */
const wxString& name = wxSliderNameStr);
virtual int GetValue(void) const;
virtual void SetValue( const int );
void GetSize( int *x, int *y ) const;
void SetSize( const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO );
void GetPosition( int *x, int *y ) const;
void SetRange( const int minValue, const int maxValue );
int GetMin(void) const;
int GetMax(void) const;
void SetTickFreq( const int n, const int pos );
int GetTickFreq(void) const;
void SetPageSize( const int pageSize );
int GetPageSize(void) const;
void ClearSel(void);
void ClearTicks(void);
void SetLineSize( const int lineSize );
int GetLineSize(void) const;
int GetSelEnd(void) const;
int GetSelStart(void) const;
void SetSelection( const int minPos, const int maxPos );
void SetThumbLength( const int len );
int GetThumbLength(void) const;
void SetTick( const int tickPos );
public:
GtkAdjustment *m_adjust;
float m_oldPos;
};
#endif // __GTKSLIDERH__

34
include/wx/gtk/statbmp.h Normal file
View File

@@ -0,0 +1,34 @@
/////////////////////////////////////////////////////////////////////////////
// Name: statbmp.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKSTATICBITMAPH__
#define __GTKSTATICBITMAPH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxStaticBitmap;
//-----------------------------------------------------------------------------
// wxStaticBitmap
//-----------------------------------------------------------------------------
#endif // __GTKSTATICBITMAPH__

55
include/wx/gtk/statbox.h Normal file
View File

@@ -0,0 +1,55 @@
/////////////////////////////////////////////////////////////////////////////
// Name: stabox.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKSTATICBOXH__
#define __GTKSTATICBOXH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxStaticBox;
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char *wxStaticBoxNameStr;
//-----------------------------------------------------------------------------
// wxStaticBox
//-----------------------------------------------------------------------------
class wxStaticBox: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxStaticBox)
public:
wxStaticBox(void);
wxStaticBox( wxWindow *parent, wxWindowID id, const wxString &label,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const long style = 0, const wxString &name = wxStaticBoxNameStr );
bool Create( wxWindow *parent, wxWindowID id, const wxString &label,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const long style = 0, const wxString &name = wxStaticBoxNameStr );
};
#endif // __GTKSTATICBOXH__

57
include/wx/gtk/stattext.h Normal file
View File

@@ -0,0 +1,57 @@
/////////////////////////////////////////////////////////////////////////////
// Name: stattext.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKSTATICTEXTH__
#define __GTKSTATICTEXTH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxStaticText;
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char *wxStaticTextNameStr;
//-----------------------------------------------------------------------------
// wxStaticText
//-----------------------------------------------------------------------------
class wxStaticText: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxStaticText)
public:
wxStaticText(void);
wxStaticText( wxWindow *parent, wxWindowID id, const wxString &label,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const long style = 0, const wxString &name = wxStaticTextNameStr );
bool Create( wxWindow *parent, wxWindowID id, const wxString &label,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const long style = 0, const wxString &name = wxStaticTextNameStr );
wxString GetLabel(void) const;
void SetLabel( const wxString &label );
};
#endif // __GTKSTATICTEXTH__

139
include/wx/gtk/tbargtk.h Normal file
View File

@@ -0,0 +1,139 @@
/////////////////////////////////////////////////////////////////////////////
// Name: tbargtk.h
// Purpose: GTK toolbar
// Author: Robert Roebling
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __TBARGTKH__
#define __TBARGTKH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxToolBarTool;
class wxToolBarGTK;
//-----------------------------------------------------------------------------
// constants
//-----------------------------------------------------------------------------
#define wxTOOL_STYLE_BUTTON 1
#define wxTOOL_STYLE_SEPARATOR 2
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char *wxToolBarNameStr;
//-----------------------------------------------------------------------------
// wxToolBarTool
//-----------------------------------------------------------------------------
class wxToolBarTool: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxToolBarTool)
public:
wxToolBarTool(void) {};
wxToolBarTool( wxToolBarGTK *owner, const int theIndex = 0,
const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap,
const bool toggle = FALSE, wxObject *clientData = NULL,
const wxString& shortHelpString = "", const wxString& longHelpString = "");
~wxToolBarTool(void);
public:
int m_toolStyle;
wxObject *m_clientData;
int m_index;
bool m_toggleState;
bool m_isToggle;
bool m_deleteSecondBitmap;
bool m_enabled;
wxBitmap m_bitmap1;
wxBitmap m_bitmap2;
bool m_isMenuCommand;
wxString m_shortHelpString;
wxString m_longHelpString;
wxToolBarGTK *m_owner;
};
//-----------------------------------------------------------------------------
// wxToolBarGTK
//-----------------------------------------------------------------------------
class wxToolBarGTK: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxToolBarGTK)
public:
wxToolBarGTK(void);
wxToolBarGTK( wxWindow *parent, const wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
const long style = 0, const wxString& name = wxToolBarNameStr );
~wxToolBarGTK(void);
bool Create( wxWindow *parent, const wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
const long style = 0, const wxString& name = wxToolBarNameStr);
// Only allow toggle if returns TRUE. Call when left button up.
virtual bool OnLeftClick(int toolIndex, bool toggleDown);
// Call when right button down.
virtual void OnRightClick(int toolIndex, float x, float y);
// Called when the mouse cursor enters a tool bitmap.
// Argument is -1 if mouse is exiting the toolbar.
virtual void OnMouseEnter(int toolIndex);
// If pushedBitmap is NULL, a reversed version of bitmap is
// created and used as the pushed/toggled image.
// If toggle is TRUE, the button toggles between the two states.
virtual wxToolBarTool *AddTool( const int toolIndex, const wxBitmap& bitmap,
const wxBitmap& pushedBitmap = wxNullBitmap, const bool toggle = FALSE,
const float xPos = -1, const float yPos = -1, wxObject *clientData = NULL,
const wxString& helpString1 = "", const wxString& helpString2 = "");
virtual void AddSeparator(void);
virtual void ClearTools(void);
virtual void EnableTool(const int toolIndex, const bool enable);
virtual void ToggleTool(const int toolIndex, const bool toggle); // toggle is TRUE if toggled on
virtual void SetToggle(const int toolIndex, const bool toggle); // Set this to be togglable (or not)
virtual wxObject *GetToolClientData(const int index) const;
virtual bool GetToolState(const int toolIndex) const;
virtual bool GetToolEnabled(const int toolIndex) const;
virtual void SetMargins(const int x, const int y);
void SetMargins(const wxSize& size) { SetMargins(size.x, size.y); };
virtual void SetToolPacking(const int packing);
virtual void SetToolSeparation(const int separation);
public:
GtkToolbar *m_toolbar;
wxList m_tools;
DECLARE_EVENT_TABLE()
};
#endif
// __TBARGTKH__

106
include/wx/gtk/textctrl.h Normal file
View File

@@ -0,0 +1,106 @@
/////////////////////////////////////////////////////////////////////////////
// Name: textctrl.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKTEXTCTRLH__
#define __GTKTEXTCTRLH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/string.h"
#include "wx/control.h"
#if USE_IOSTREAMH
#include <iostream.h>
#else
#include <iostream>
#endif
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxTextCtrl;
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char *wxTextCtrlNameStr;
//-----------------------------------------------------------------------------
// wxTextCtrl
//-----------------------------------------------------------------------------
class wxTextCtrl: public wxControl, public streambuf
{
DECLARE_DYNAMIC_CLASS(wxTextCtrl);
public:
wxTextCtrl(void);
wxTextCtrl( wxWindow *parent, const wxWindowID id, const wxString &value = "",
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const int style = 0, const wxString &name = wxTextCtrlNameStr );
bool Create( wxWindow *parent, const wxWindowID id, const wxString &value = "",
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const int style = 0, const wxString &name = wxTextCtrlNameStr );
wxString GetValue(void) const;
void SetValue( const wxString &value );
void WriteText( const wxString &text );
/*
wxString GetLineText( const long lineNo ) const;
bool LoadFile( const wxString &file );
bool SaveFile( const wxString &file );
void DiscardEdits(void);
bool IsModified(void);
void OnDropFiles( wxDropFilesEvent &event );
long PositionToXY( const long pos, long *x, long *y ) const;
long XYToPosition( const long x, const long y );
int GetNumberOfLines(void);
*/
virtual void SetInsertionPoint( const long pos );
virtual void SetInsertionPointEnd(void);
virtual void SetEditable( const bool editable );
virtual void SetSelection( const long from, const long to );
void ShowPosition( const long pos );
virtual long GetInsertionPoint(void) const;
virtual long GetLastPosition(void) const;
virtual void Remove( const long from, const long to );
virtual void Replace( const long from, const long to, const wxString &value );
void Cut(void);
void Copy(void);
void Paste(void);
void Delete(void);
void OnChar( wxKeyEvent &event );
int overflow(int i);
int sync(void);
int underflow(void);
wxTextCtrl& operator<<(const wxString& s);
wxTextCtrl& operator<<(const int i);
wxTextCtrl& operator<<(const long i);
wxTextCtrl& operator<<(const float f);
wxTextCtrl& operator<<(const double d);
wxTextCtrl& operator<<(const char c);
DECLARE_EVENT_TABLE()
};
#endif // __GTKTEXTCTRLH__

53
include/wx/gtk/timer.h Normal file
View File

@@ -0,0 +1,53 @@
/////////////////////////////////////////////////////////////////////////////
// Name: timer.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKTIMERH__
#define __GTKTIMERH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
//-----------------------------------------------------------------------------
// derived classes
//-----------------------------------------------------------------------------
class wxTimer;
//-----------------------------------------------------------------------------
// wxTimer
//-----------------------------------------------------------------------------
class wxTimer: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxTimer)
public:
wxTimer(void);
~wxTimer(void);
int Interval(void);
bool OneShot(void);
virtual void Notify(void);
void Start( int millisecs = -1, bool oneShot = FALSE );
void Stop(void);
private:
int m_tag;
int m_time;
bool m_oneShot;
};
#endif // __GTKTIMERH__

75
include/wx/gtk/win_gtk.h Normal file
View File

@@ -0,0 +1,75 @@
/////////////////////////////////////////////////////////////////////////////
// Name: win_gtk.h
// Purpose: wxWindows's GTK base widget
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTK_MYFIXED_H__
#define __GTK_MYFIXED_H__
#include <gdk/gdk.h>
#include <gtk/gtkcontainer.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define GTK_MYFIXED(obj) GTK_CHECK_CAST (obj, gtk_myfixed_get_type (), GtkMyFixed)
#define GTK_MYFIXED_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_myfixed_get_type (), GtkMyFixedClass)
#define GTK_IS_MYFIXED(obj) GTK_CHECK_TYPE (obj, gtk_myfixed_get_type ())
typedef struct _GtkMyFixed GtkMyFixed;
typedef struct _GtkMyFixedClass GtkMyFixedClass;
typedef struct _GtkMyFixedChild GtkMyFixedChild;
struct _GtkMyFixed
{
GtkContainer container;
GList *children;
gint16 scroll_offset_x;
gint16 scroll_offset_y;
};
struct _GtkMyFixedClass
{
GtkContainerClass parent_class;
};
struct _GtkMyFixedChild
{
GtkWidget *widget;
gint16 x;
gint16 y;
};
guint gtk_myfixed_get_type (void);
GtkWidget* gtk_myfixed_new (void);
void gtk_myfixed_set_offset (GtkMyFixed *myfixed,
gint16 x,
gint16 y);
void gtk_myfixed_put (GtkMyFixed *myfixed,
GtkWidget *widget,
gint16 x,
gint16 y);
void gtk_myfixed_move (GtkMyFixed *myfixed,
GtkWidget *widget,
gint16 x,
gint16 y);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GTK_MYFIXED_H__ */

262
include/wx/gtk/window.h Normal file
View File

@@ -0,0 +1,262 @@
/////////////////////////////////////////////////////////////////////////////
// Name: window.h
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKWINDOWH__
#define __GTKWINDOWH__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/event.h"
#include "wx/validate.h"
#include "wx/cursor.h"
#include "wx/font.h"
#include "wx/dc.h"
#include "wx/region.h"
#include "wx/dnd.h"
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char *wxFrameNameStr;
extern wxList wxTopLevelWindows;
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxLayoutConstraints;
class wxSizer;
class wxWindow;
class wxCanvas;
//-----------------------------------------------------------------------------
// global data
//-----------------------------------------------------------------------------
extern const char *wxPanelNameStr;
extern const wxSize wxDefaultSize;
extern const wxPoint wxDefaultPosition;
//-----------------------------------------------------------------------------
// wxWindow
//-----------------------------------------------------------------------------
class wxWindow: public wxEvtHandler
{
DECLARE_DYNAMIC_CLASS(wxWindow)
public:
wxWindow(void);
wxWindow( wxWindow *parent, const wxWindowID id,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const long style = 0, const wxString &name = wxPanelNameStr );
bool Create( wxWindow *parent, const wxWindowID id,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
const long style = 0, const wxString &name = wxPanelNameStr );
virtual ~wxWindow(void);
bool Close( const bool force = FALSE );
virtual bool Destroy(void);
virtual bool DestroyChildren(void);
virtual void PrepareDC( wxDC &dc );
virtual void SetSize( const int x, const int y, const int width, const int height,
const int sizeFlags = wxSIZE_AUTO );
virtual void SetSize( const int width, const int height );
virtual void Move( const int x, const int y );
virtual void GetSize( int *width, int *height ) const;
virtual void SetClientSize( int const width, int const height );
virtual void GetClientSize( int *width, int *height ) const;
virtual void GetPosition( int *x, int *y ) const;
virtual void Centre( const int direction = wxHORIZONTAL );
virtual void Fit(void);
void OnSize( wxSizeEvent &event );
virtual bool Show( const bool show );
virtual void Enable( const bool enable );
virtual void MakeModal( const bool modal );
virtual bool IsEnabled(void) const { return m_isEnabled; };
virtual void SetFocus(void);
virtual bool OnClose(void);
virtual void AddChild( wxWindow *child );
wxList *GetChildren(void);
virtual void RemoveChild( wxWindow *child );
void SetReturnCode( int retCode );
int GetReturnCode(void);
wxWindow *GetParent(void);
wxEvtHandler *GetEventHandler(void);
void SetEventhandler( wxEvtHandler *handler );
virtual wxValidator *GetValidator(void);
virtual void SetValidator( wxValidator *validator );
bool IsBeingDeleted(void);
void SetId( wxWindowID id );
wxWindowID GetId(void);
void SetCursor( const wxCursor &cursor );
virtual void Refresh( const bool eraseBackground = TRUE, const wxRect *rect = NULL );
virtual void Clear(void);
virtual bool IsExposed( const long x, const long y );
virtual bool IsExposed( const long x, const long y, const long width, const long height );
virtual wxColour GetBackgroundColour(void) const;
virtual void SetBackgroundColour( const wxColour &colour );
virtual void SetDefaultBackgroundColour( const wxColour& col )
{ m_defaultBackgroundColour = col; };
virtual wxColour GetDefaultBackgroundColour(void) const
{ return m_defaultBackgroundColour; };
virtual void SetDefaultForegroundColour( const wxColour& col )
{ m_defaultForegroundColour = col; };
virtual wxColour GetDefaultForegroundColour(void) const
{ return m_defaultForegroundColour; };
virtual void SetFont( const wxFont &font );
virtual wxFont *GetFont(void);
// For backward compatibility
inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
inline virtual wxFont *GetLabelFont(void) { return GetFont(); };
inline virtual wxFont *GetButtonFont(void) { return GetFont(); };
virtual void SetWindowStyleFlag( long flag );
virtual long GetWindowStyleFlag(void) const;
virtual void CaptureMouse(void);
virtual void ReleaseMouse(void);
virtual void SetTitle( const wxString &title );
virtual wxString GetTitle(void) const;
virtual void SetName( const wxString &name );
virtual wxString GetName(void) const;
virtual wxString GetLabel(void) const;
void OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) ) {};
virtual bool IsShown(void);
virtual bool IsRetained(void);
virtual wxWindow *FindWindow( const long id );
virtual wxWindow *FindWindow( const wxString& name );
void AllowDoubleClick( bool WXUNUSED(allow) ) {};
void SetDoubleClick( bool WXUNUSED(allow) ) {};
virtual void ClientToScreen( int *x, int *y );
virtual void ScreenToClient( int *x, int *y );
virtual bool Validate(void);
virtual bool TransferDataToWindow(void);
virtual bool TransferDataFromWindow(void);
void OnInitDialog( wxInitDialogEvent &event );
virtual void InitDialog(void);
virtual void SetDropTarget( wxDropTarget *dropTarget );
virtual wxDropTarget *GetDropTarget() const;
virtual void SetScrollbar( const int orient, const int pos, const int thumbVisible,
const int range, const bool refresh = TRUE );
virtual void SetScrollPos( const int orient, const int pos, const bool refresh = TRUE );
virtual int GetScrollPos( const int orient ) const;
virtual int GetScrollThumb( const int orient ) const;
virtual int GetScrollRange( const int orient ) const;
virtual void ScrollWindow( const int dx, const int dy, const wxRect* rect = NULL );
public: // cannot get private going yet
void PreCreation( wxWindow *parent, const wxWindowID id, const wxPoint &pos,
const wxSize &size, const long style, const wxString &name );
void PostCreation(void);
bool HasVMT(void);
virtual void ImplementSetSize(void);
virtual void ImplementSetPosition(void);
void GetDrawingOffset( long *x, long *y );
wxWindow *m_parent;
wxList m_children;
int m_x,m_y;
int m_width,m_height;
int m_retCode;
wxEvtHandler *m_eventHandler;
wxValidator *m_windowValidator;
wxDropTarget *m_pDropTarget;
wxWindowID m_windowId;
wxCursor *m_cursor;
wxFont m_font;
wxColour m_backgroundColour;
wxColour m_defaultBackgroundColour;
wxColour m_foregroundColour ;
wxColour m_defaultForegroundColour;
wxRegion m_updateRegion;
long m_windowStyle;
bool m_isShown;
bool m_isEnabled;
wxString m_windowName;
long m_drawingOffsetX,m_drawingOffsetY;
GtkWidget *m_widget;
GtkWidget *m_wxwindow;
GtkAdjustment *m_hAdjust,*m_vAdjust;
float m_oldHorizontalPos;
float m_oldVerticalPos;
bool m_needParent;
bool m_hasScrolling;
bool m_hasVMT;
bool m_sizeSet;
public: // Layout section
wxLayoutConstraints * m_constraints;
wxList * m_constraintsInvolvedIn;
wxSizer * m_windowSizer;
wxWindow * m_sizerParent;
bool m_autoLayout;
wxLayoutConstraints *GetConstraints(void) const;
void SetConstraints( wxLayoutConstraints *constraints );
void SetAutoLayout( const bool autoLayout );
bool GetAutoLayout(void) const;
bool Layout(void);
void SetSizer( wxSizer *sizer );
wxSizer *GetSizer(void) const;
void SetSizerParent( wxWindow *win );
wxWindow *GetSizerParent(void) const;
void UnsetConstraints(wxLayoutConstraints *c);
inline wxList *GetConstraintsInvolvedIn(void) const ;
void AddConstraintReference(wxWindow *otherWin);
void RemoveConstraintReference(wxWindow *otherWin);
void DeleteRelatedConstraints(void);
virtual void ResetConstraints(void);
virtual void SetConstraintSizes(const bool recurse = TRUE);
virtual bool LayoutPhase1(int *noChanges);
virtual bool LayoutPhase2(int *noChanges);
virtual bool DoPhase(const int);
virtual void TransformSizerToActual(int *x, int *y) const ;
virtual void SizerSetSize(const int x, const int y, const int w, const int h);
virtual void SizerMove(const int x, const int y);
virtual void SetSizeConstraint(const int x, const int y, const int w, const int h);
virtual void MoveConstraint(const int x, const int y);
virtual void GetSizeConstraint(int *w, int *h) const ;
virtual void GetClientSizeConstraint(int *w, int *h) const ;
virtual void GetPositionConstraint(int *x, int *y) const ;
DECLARE_EVENT_TABLE()
};
#endif // __GTKWINDOWH__