added some wxMSW stuff
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
@@ -0,0 +1,128 @@
|
||||
|
||||
Installing wxWindows 2.0
|
||||
------------------------
|
||||
|
||||
Unarchiving
|
||||
-----------
|
||||
|
||||
If there is a setup program, run the setup program that comes with the Windows version.
|
||||
Do not install into a path that contains spaces. The installation program should set the
|
||||
WXWIN environment variable, which will be activated when your machine is rebooted.
|
||||
|
||||
If there is no setup program, it will come as a series of .zip
|
||||
files:
|
||||
|
||||
wx200gen.zip Generic source code and samples (required)
|
||||
wx200msw.zip Windows-specific source code and samples (required)
|
||||
wx200doc.zip Documentation source code (not required)
|
||||
wx200hlp.zip WinHelp documentation
|
||||
wx200ps.zip PostScript documentation (will probably
|
||||
disappear in favour of PDF)
|
||||
wx200pdf.zip Acrobat PDF documentation
|
||||
wx200htm.zip HTML documentation
|
||||
|
||||
Unarchive the required files plus any optional documentation
|
||||
files into a suitable directory such as c:\wx. Alter your
|
||||
WXWIN environment variable to point to this directory.
|
||||
|
||||
Compilation
|
||||
-----------
|
||||
|
||||
At present, wxWindows compiles with VC++ 1.5, VC++ 4.0, VC++ 5.0,
|
||||
BC++ 4.5/5.0, Gnu-Win32 b19, and Mingw32.
|
||||
|
||||
Visual C++ 4.0/5.0 compilation
|
||||
------------------------------
|
||||
|
||||
1. Change directory to wx\src\msw. Type 'nmake -f makefile.nt' to
|
||||
make the wxWindows core library.
|
||||
2. Change directory to wx\samples and type 'nmake -f makefile.nt'
|
||||
to make all the samples. You can also make them individually.
|
||||
|
||||
Visual C++ 1.5 compilation
|
||||
--------------------------
|
||||
|
||||
1. Change directory to wx\src\msw. Type 'nmake -f makefile.dos' to
|
||||
make the wxWindows core library.
|
||||
2. Change directory to wx\samples and type 'nmake -f makefile.b32'
|
||||
to make all the samples. You can also make them individually.
|
||||
NOTE: only a few samples have up-to-date makefiles, e.g.
|
||||
minimal, docview, mdi. The utils makefile does not yet work.
|
||||
|
||||
Borland C++ 4.5/5.0 compilation
|
||||
-------------------------------
|
||||
|
||||
1. Change directory to wx\src\msw. Type 'make -f makefile.b32' to
|
||||
make the wxWindows core library.
|
||||
2. Change directory to wx\samples and type 'make -f makefile.b32'
|
||||
to make all the samples. You can also make them individually.
|
||||
NOTE: only a few samples have up-to-date makefiles, e.g.
|
||||
minimal, docview, mdi. The utils makefile does not yet work.
|
||||
|
||||
Gnu-Win32 b19/Mingw32 compilation
|
||||
---------------------------------
|
||||
|
||||
wxWindows 2.0 supports Gnu-Win32 b19, Mingw32, and Mingw32/EGCS.
|
||||
|
||||
Thanks are due to Keith Garry Boyce (garp@opustel.com) and Cygnus for making
|
||||
it all possible.
|
||||
|
||||
From wxWindows 2.0 beta 9, both Gnu-Win32 b19 and Mingw32 (the minimal
|
||||
distribution of Gnu-Win32) can be used with the same makefiles.
|
||||
|
||||
Here are the steps required:
|
||||
|
||||
- Retrieve and install the latest beta of Gnu-Win32, or Mingw32, as per the
|
||||
instructions with either of these packages.
|
||||
|
||||
- If using Mingw32 (including the EGCS variant), you need some
|
||||
extra files to use the wxWindows makefiles. You can find these
|
||||
files in ports/mingw32 on the ftp site or CD-ROM, as extra.zip.
|
||||
These should be extracted to the Mingw32 directory.
|
||||
|
||||
- Modify the file wx/src/cygnus.bat (or mingw32.bat or mingegcs.bat)
|
||||
to set up appropriate variables, if necessary mounting drives.
|
||||
Run it before compiling.
|
||||
|
||||
- For Gnu-Win32, make sure there's a \tmp directory on your
|
||||
Windows drive or bison will crash.
|
||||
|
||||
- Edit wx/src/makeg95.env and search for MINGW32. Take note of
|
||||
the comments for adjusting settings to suit Gnu-Win32 or
|
||||
Mingw32. Basically, this is just a case of adding the __MINGW32__ symbol
|
||||
to OPTIONS for Mingw32, or removing it for Cygnus Gnu-Win32.
|
||||
For Mingw32/EGCS, add both __MINGW32__ and __EGCS__.
|
||||
|
||||
- Use the makefile.g95 files for compiling wxWindows and samples,
|
||||
e.g.:
|
||||
> cd c:\wx\src\msw
|
||||
> make -f makefile.g95
|
||||
> cd c:\wx\samples\minimal
|
||||
> make -f makefile.g95
|
||||
|
||||
- Use the 'strip' command to reduce executable size.
|
||||
|
||||
- With Cygnus Gnu-Win32, you can invoke gdb --nw myfile.exe to
|
||||
debug an executable.
|
||||
|
||||
- If using GnuWin32 b18, you will need to copy windres.exe
|
||||
from e.g. the Mingw32 distribution, to a directory in your path.
|
||||
|
||||
All targets have 'clean' targets to allow removal of object files
|
||||
and other intermediate compiler files.
|
||||
|
||||
Gotchas:
|
||||
|
||||
- libwx.a is 28 MB or more.
|
||||
- install.exe doesn't have built-in decompression because lzexpand.lib
|
||||
isn't available with Gnu-Win32. However, you can use it with external
|
||||
decompression utilities.
|
||||
|
||||
References:
|
||||
|
||||
- The GNU-WIN32 site is at
|
||||
http://www.cygnus.com/gnu-win32/
|
||||
- Mingw32 is available at:
|
||||
http://agnes.dida.physik.uni-essen.de/~janjaap/mingw32/index.html
|
||||
- See also http://web.ukonline.co.uk/julian.smart/wxwin/gnuwin32.htm
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
Current issues and bugs
|
||||
-----------------------
|
||||
|
||||
Debugging code
|
||||
--------------
|
||||
|
||||
wxDebugContext and global memory operators doesn't work correctly,
|
||||
for different (unresolved) reasons on different compilers.
|
||||
|
||||
1) In VC++ 5.0, if you use wxDebugAlloc for new and wxDebugFree
|
||||
for delete, you get a crash to do with deallocating the debug
|
||||
buffer in wxDebugContext. So although the global operators are
|
||||
defined, they are #ifdefed to just call malloc and free to avoid
|
||||
the problem. This means that non-object memory checking doesn't work.
|
||||
The problem does seem to be something to do with a pointer
|
||||
mysteriously changing its address, very similar to 2).
|
||||
|
||||
2) In BC++ 4.5, there isn't a crash, but instead the ofstream
|
||||
pointer passed to SetStream from SetFile (which is called in
|
||||
memcheck.cpp) gets mysteriously changed as it's passed to SetStream.
|
||||
This means that when counting the number of outstanding memory
|
||||
blocks, we can't compare the allocated block with m_debugStream
|
||||
to say 'ignore this block because we can't free it before the
|
||||
very end of the application'. Therefore it always looks like
|
||||
there's a memory leak of one object, in memory.cpp, unless you
|
||||
don't call wxDebugContext::SetFile.
|
||||
|
||||
The fact that pointers appear to change in both cases must
|
||||
indicate a common problem and solution. If we could use the
|
||||
standard global memory operators for ofstream and
|
||||
wxDebugStreamBuf it might help, but I don't know how to do that -
|
||||
I've redefined 'new' throughout as WXDEBUG_NEW (which is itself
|
||||
defined as the 3-argument operator).
|
||||
|
||||
Config/registry classes
|
||||
-----------------------
|
||||
|
||||
Problems with Karsten's/Vadim's existing AppConfig classes:
|
||||
|
||||
- use char* a lot instead of wxString
|
||||
- rather hard to understand
|
||||
- will need fairly substantial rewrite
|
||||
- no native .ini functions (?) for guaranteed Windows
|
||||
compatibility
|
||||
- new wxWin docs required
|
||||
|
||||
Good things:
|
||||
|
||||
- exists!
|
||||
- FileConfig independent of OS
|
||||
- specifying a base class that will meet nearly all needs for
|
||||
derived classes
|
||||
- enumerator
|
||||
|
||||
Other features we should probably have:
|
||||
|
||||
- ability to specify vendor name/app name in constructor
|
||||
- under Windows, ability to read/write all areas of registry
|
||||
as an option
|
||||
|
||||
Options:
|
||||
|
||||
- rewrite AppConfig
|
||||
- start from own CRegistry class
|
||||
- take elements from both
|
||||
- do the Windows stuff, let someone else write/adapt the
|
||||
non-Windows classes
|
||||
@@ -0,0 +1,5 @@
|
||||
This is the wxWindows for Windows Preview.
|
||||
|
||||
For more information, please see changes.txt, todo.txt, and the
|
||||
manuals.
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: app.h
|
||||
// Purpose: wxApp class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __APPH__
|
||||
#define __APPH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "app.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
|
||||
class WXDLLEXPORT wxFrame;
|
||||
class WXDLLEXPORT wxWindow;
|
||||
class WXDLLEXPORT wxApp ;
|
||||
class WXDLLEXPORT wxKeyEvent;
|
||||
class WXDLLEXPORT wxLog;
|
||||
|
||||
#define wxPRINT_WINDOWS 1
|
||||
#define wxPRINT_POSTSCRIPT 2
|
||||
|
||||
WXDLLEXPORT_DATA(extern wxApp*) wxTheApp;
|
||||
|
||||
void WXDLLEXPORT wxCleanUp(void);
|
||||
void WXDLLEXPORT wxCommonCleanUp(void); // Call this from the platform's wxCleanUp()
|
||||
void WXDLLEXPORT wxCommonInit(void); // Call this from the platform's initialization
|
||||
|
||||
// Force an exit from main loop
|
||||
void WXDLLEXPORT wxExit(void);
|
||||
|
||||
// Yield to other apps/messages
|
||||
bool WXDLLEXPORT wxYield(void);
|
||||
|
||||
// Represents the application. Derive OnInit and declare
|
||||
// a new App object to start application
|
||||
class WXDLLEXPORT wxApp: public wxEvtHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxApp)
|
||||
wxApp(void);
|
||||
inline ~wxApp(void) {}
|
||||
|
||||
static void SetInitializerFunction(wxAppInitializerFunction fn) { m_appInitFn = fn; }
|
||||
static wxAppInitializerFunction GetInitializerFunction(void) { return m_appInitFn; }
|
||||
|
||||
virtual int MainLoop(void);
|
||||
void ExitMainLoop(void);
|
||||
bool Initialized(void);
|
||||
virtual bool Pending(void) ;
|
||||
virtual void Dispatch(void) ;
|
||||
|
||||
virtual void OnIdle(wxIdleEvent& event);
|
||||
|
||||
// Windows specific. Intercept keyboard input.
|
||||
#if WXWIN_COMPATIBILITY == 2
|
||||
virtual bool OldOnCharHook(wxKeyEvent& event);
|
||||
#endif
|
||||
|
||||
// Generic
|
||||
virtual bool OnInit(void) { return FALSE; };
|
||||
|
||||
// No specific tasks to do here.
|
||||
virtual bool OnInitGui(void) { return TRUE; }
|
||||
|
||||
// Called to set off the main loop
|
||||
virtual int OnRun(void) { return MainLoop(); };
|
||||
virtual int OnExit(void) { return 0; };
|
||||
inline void SetPrintMode(int mode) { m_printMode = mode; }
|
||||
inline int GetPrintMode(void) const { return m_printMode; }
|
||||
|
||||
inline void SetExitOnFrameDelete(bool flag) { m_exitOnFrameDelete = flag; }
|
||||
inline bool GetExitOnFrameDelete(void) const { return m_exitOnFrameDelete; }
|
||||
|
||||
/*
|
||||
inline void SetShowFrameOnInit(bool flag) { m_showOnInit = flag; }
|
||||
inline bool GetShowFrameOnInit(void) const { return m_showOnInit; }
|
||||
*/
|
||||
|
||||
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; }
|
||||
wxWindow *GetTopWindow(void) const ;
|
||||
inline void SetTopWindow(wxWindow *win) { m_topWindow = win; }
|
||||
|
||||
inline void SetWantDebugOutput(bool flag) { m_wantDebugOutput = flag; }
|
||||
inline bool GetWantDebugOutput(void) { return m_wantDebugOutput; }
|
||||
|
||||
// Send idle event to all top-level windows.
|
||||
// Returns TRUE if more idle time is requested.
|
||||
bool SendIdleEvents(void);
|
||||
|
||||
// Send idle event to window and all subwindows
|
||||
// Returns TRUE if more idle time is requested.
|
||||
bool SendIdleEvents(wxWindow* win);
|
||||
|
||||
inline void SetAuto3D(const bool flag) { m_auto3D = flag; }
|
||||
inline bool GetAuto3D(void) const { return m_auto3D; }
|
||||
|
||||
// Creates a log object
|
||||
virtual wxLog* CreateLogTarget(void);
|
||||
|
||||
public:
|
||||
// void (*work_proc)(wxApp*app); // work procedure;
|
||||
int argc;
|
||||
char ** argv;
|
||||
|
||||
protected:
|
||||
bool m_wantDebugOutput ;
|
||||
wxString m_className;
|
||||
wxString m_appName;
|
||||
wxWindow * m_topWindow;
|
||||
bool m_exitOnFrameDelete;
|
||||
bool m_showOnInit;
|
||||
int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
|
||||
bool m_auto3D ; // Always use 3D controls, except
|
||||
// where overriden
|
||||
static wxAppInitializerFunction m_appInitFn;
|
||||
|
||||
/* Windows-specific wxApp definitions */
|
||||
|
||||
public:
|
||||
|
||||
// Implementation
|
||||
static bool Initialize(WXHINSTANCE instance);
|
||||
static void CommonInit(void);
|
||||
static bool RegisterWindowClasses(void);
|
||||
static void CleanUp(void);
|
||||
static void CommonCleanUp(void);
|
||||
virtual bool DoMessage(void);
|
||||
virtual bool ProcessMessage(WXMSG* pMsg);
|
||||
void DeletePendingObjects(void);
|
||||
bool ProcessIdle(void);
|
||||
|
||||
/*
|
||||
inline void SetPendingCleanup(bool flag) { m_pendingCleanup = flag; }
|
||||
inline bool GetPendingCleanup(void) { return m_pendingCleanup; }
|
||||
|
||||
bool DoResourceCleanup(void);
|
||||
// Set resource collection scheme on or off.
|
||||
inline void SetResourceCollection(bool flag) { m_resourceCollection = flag; }
|
||||
inline bool GetResourceCollection(void) { return m_resourceCollection; }
|
||||
*/
|
||||
|
||||
public:
|
||||
static long sm_lastMessageTime;
|
||||
int m_nCmdShow;
|
||||
|
||||
protected:
|
||||
bool m_keepGoing ;
|
||||
// bool m_resourceCollection;
|
||||
// bool m_pendingCleanup; // TRUE if we need to check the GDI object lists for cleanup
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#if !defined(_WINDLL) || (defined(_WINDLL) && defined(WXMAKINGDLL))
|
||||
int WXDLLEXPORT wxEntry(WXHINSTANCE hInstance, WXHINSTANCE hPrevInstance, char *lpszCmdLine,
|
||||
int nCmdShow, bool enterLoop = TRUE);
|
||||
#else
|
||||
int WXDLLEXPORT wxEntry(WXHINSTANCE hInstance);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// __APPH__
|
||||
|
||||
|
After Width: | Height: | Size: 326 B |
@@ -0,0 +1,85 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: bmpbuttn.h
|
||||
// Purpose: wxBitmapButton class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __BMPBUTTNH__
|
||||
#define __BMPBUTTNH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "bmpbuttn.h"
|
||||
#endif
|
||||
|
||||
#include "wx/button.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr;
|
||||
|
||||
#define wxDEFAULT_BUTTON_MARGIN 4
|
||||
|
||||
class WXDLLEXPORT wxBitmapButton: public wxButton
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapButton)
|
||||
public:
|
||||
inline wxBitmapButton(void) { m_marginX = wxDEFAULT_BUTTON_MARGIN; m_marginY = wxDEFAULT_BUTTON_MARGIN; }
|
||||
inline wxBitmapButton(wxWindow *parent, const wxWindowID id, const wxBitmap& bitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, const long style = wxBU_AUTODRAW,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr)
|
||||
{
|
||||
Create(parent, id, bitmap, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id, const wxBitmap& bitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, const long style = wxBU_AUTODRAW,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
|
||||
virtual void SetLabel(const wxBitmap& bitmap)
|
||||
{
|
||||
SetBitmapLabel(bitmap);
|
||||
}
|
||||
|
||||
virtual void SetBitmapLabel(const wxBitmap& bitmap);
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
inline wxBitmap *GetBitmap(void) const { return (wxBitmap *) & m_buttonBitmap; }
|
||||
#endif
|
||||
|
||||
inline wxBitmap& GetBitmapLabel(void) const { return (wxBitmap&) m_buttonBitmap; }
|
||||
inline wxBitmap& GetBitmapSelected(void) const { return (wxBitmap&) m_buttonBitmapSelected; }
|
||||
inline wxBitmap& GetBitmapFocus(void) const { return (wxBitmap&) m_buttonBitmapFocus; }
|
||||
inline wxBitmap& GetBitmapDisabled(void) const { return (wxBitmap&) m_buttonBitmapDisabled; }
|
||||
|
||||
inline void SetBitmapSelected(const wxBitmap& sel) { m_buttonBitmapSelected = sel; };
|
||||
inline void SetBitmapFocus(const wxBitmap& focus) { m_buttonBitmapFocus = focus; };
|
||||
inline void SetBitmapDisabled(const wxBitmap& disabled) { m_buttonBitmapDisabled = disabled; };
|
||||
|
||||
inline void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; }
|
||||
inline int GetMarginX(void) { return m_marginX; }
|
||||
inline int GetMarginY(void) { return m_marginY; }
|
||||
|
||||
// Implementation
|
||||
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||
virtual void DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel );
|
||||
virtual void DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel );
|
||||
virtual void DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg );
|
||||
|
||||
protected:
|
||||
wxBitmap m_buttonBitmap;
|
||||
wxBitmap m_buttonBitmapSelected;
|
||||
wxBitmap m_buttonBitmapFocus;
|
||||
wxBitmap m_buttonBitmapDisabled;
|
||||
int m_marginX;
|
||||
int m_marginY;
|
||||
};
|
||||
|
||||
#endif
|
||||
// __BMPBUTTNH__
|
||||
@@ -0,0 +1,84 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.h
|
||||
// Purpose: wxBrush class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __BRUSHH__
|
||||
#define __BRUSHH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "brush.h"
|
||||
#endif
|
||||
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
class WXDLLEXPORT wxBrush;
|
||||
|
||||
class WXDLLEXPORT wxBrushRefData: public wxGDIRefData
|
||||
{
|
||||
friend class WXDLLEXPORT wxBrush;
|
||||
public:
|
||||
wxBrushRefData(void);
|
||||
~wxBrushRefData(void);
|
||||
|
||||
protected:
|
||||
int m_style;
|
||||
wxBitmap m_stipple ;
|
||||
wxColour m_colour;
|
||||
WXHBRUSH m_hBrush;
|
||||
};
|
||||
|
||||
#define M_BRUSHDATA ((wxBrushRefData *)m_refData)
|
||||
|
||||
// Brush
|
||||
class WXDLLEXPORT wxBrush: public wxGDIObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBrush)
|
||||
|
||||
public:
|
||||
wxBrush(void);
|
||||
wxBrush(const wxColour& col, const int style);
|
||||
wxBrush(const wxString& col, const int style);
|
||||
wxBrush(const wxBitmap& stipple);
|
||||
inline wxBrush(const wxBrush& brush) { Ref(brush); }
|
||||
inline wxBrush(const wxBrush* brush) { /* UnRef(); */ if (brush) Ref(*brush); }
|
||||
~wxBrush(void);
|
||||
|
||||
virtual void SetColour(const wxColour& col) ;
|
||||
virtual void SetColour(const wxString& col) ;
|
||||
virtual void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ;
|
||||
virtual void SetStyle(const int style) ;
|
||||
virtual void SetStipple(const wxBitmap& stipple) ;
|
||||
|
||||
inline wxBrush& operator = (const wxBrush& brush) { if (*this == brush) return (*this); Ref(brush); return *this; }
|
||||
inline bool operator == (const wxBrush& brush) { return m_refData == brush.m_refData; }
|
||||
inline bool operator != (const wxBrush& brush) { return m_refData != brush.m_refData; }
|
||||
|
||||
inline wxColour& GetColour(void) const { return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour); };
|
||||
inline int GetStyle(void) const { return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0); };
|
||||
inline wxBitmap *GetStipple(void) const { return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0); };
|
||||
|
||||
virtual bool Ok(void) const { return (m_refData != NULL) ; }
|
||||
|
||||
// Internal
|
||||
bool RealizeResource(void);
|
||||
WXHANDLE GetResourceHandle(void) ;
|
||||
bool FreeResource(bool force = FALSE);
|
||||
/*
|
||||
bool UseResource(void);
|
||||
bool ReleaseResource(void);
|
||||
*/
|
||||
|
||||
bool IsFree(void);
|
||||
};
|
||||
|
||||
#endif
|
||||
// __BRUSHH__
|
||||
|
After Width: | Height: | Size: 326 B |
@@ -0,0 +1,56 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: button.h
|
||||
// Purpose: wxButton class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __BUTTONH__
|
||||
#define __BUTTONH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "button.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr;
|
||||
|
||||
// Pushbutton
|
||||
class WXDLLEXPORT wxButton: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxButton)
|
||||
public:
|
||||
inline wxButton(void) {}
|
||||
inline wxButton(wxWindow *parent, const wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, const long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, const long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
|
||||
virtual void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void SetDefault(void);
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual wxString GetLabel(void) const ;
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
virtual bool MSWCommand(const WXUINT param, const WXWORD id);
|
||||
virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
};
|
||||
|
||||
#endif
|
||||
// __BUTTONH__
|
||||
@@ -0,0 +1,84 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: checkbox.h
|
||||
// Purpose: wxCheckBox class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CHECKBOXH__
|
||||
#define __CHECKBOXH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "checkbox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr;
|
||||
|
||||
// Checkbox item (single checkbox)
|
||||
class WXDLLEXPORT wxBitmap;
|
||||
class WXDLLEXPORT wxCheckBox: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCheckBox)
|
||||
|
||||
public:
|
||||
inline wxCheckBox(void) { }
|
||||
inline wxCheckBox(wxWindow *parent, const wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, const long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, const long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
virtual void SetValue(const bool);
|
||||
virtual bool GetValue(void) const ;
|
||||
virtual void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
|
||||
virtual bool MSWCommand(const WXUINT param, const WXWORD id);
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
|
||||
|
||||
public:
|
||||
int checkWidth ;
|
||||
int checkHeight ;
|
||||
|
||||
inline wxBitmapCheckBox(void) { checkWidth = -1; checkHeight = -1; }
|
||||
inline wxBitmapCheckBox(wxWindow *parent, const wxWindowID id, const wxBitmap *label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, const long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id, const wxBitmap *bitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, const long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
virtual void SetValue(const bool);
|
||||
virtual bool GetValue(void) const ;
|
||||
virtual void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void SetLabel(const wxBitmap *bitmap);
|
||||
};
|
||||
#endif
|
||||
// __CHECKBOXH__
|
||||
@@ -0,0 +1,62 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: checklst.h
|
||||
// Purpose: wxCheckListBox class - a listbox with checkable items
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 16.11.97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CHECKLST_H__
|
||||
#define __CHECKLST_H__
|
||||
|
||||
typedef unsigned int uint;
|
||||
|
||||
#if !USE_OWNER_DRAWN
|
||||
#error "wxCheckListBox class requires owner-drawn functionality."
|
||||
#endif
|
||||
|
||||
class wxCheckListBoxItem; // fwd decl, define in checklst.cpp
|
||||
|
||||
class wxCheckListBox : public wxListBox
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCheckListBox)
|
||||
public:
|
||||
// ctors
|
||||
wxCheckListBox();
|
||||
wxCheckListBox(wxWindow *parent, const wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const int nStrings = 0,
|
||||
const wxString choices[] = NULL,
|
||||
const long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
// const wxFont& font = wxNullFont);
|
||||
|
||||
// items may be checked
|
||||
bool IsChecked(uint uiIndex) const;
|
||||
void Check(uint uiIndex, bool bCheck = TRUE);
|
||||
|
||||
// accessors
|
||||
uint GetItemHeight() const { return m_nItemHeight; }
|
||||
|
||||
protected:
|
||||
// we create our items ourselves and they have non-standard size,
|
||||
// so we need to override these functions
|
||||
virtual wxOwnerDrawn *CreateItem(uint n);
|
||||
virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
|
||||
|
||||
// pressing space or clicking the check box toggles the item
|
||||
void OnChar(wxKeyEvent& event);
|
||||
void OnLeftClick(wxMouseEvent& event);
|
||||
|
||||
private:
|
||||
uint m_nItemHeight; // height of checklistbox items (the same for all)
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif //_CHECKLST_H
|
||||
@@ -0,0 +1,78 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: choice.h
|
||||
// Purpose: wxChoice class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CHOICEH__
|
||||
#define __CHOICEH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "choice.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr;
|
||||
|
||||
// Choice item
|
||||
class WXDLLEXPORT wxChoice: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxChoice)
|
||||
|
||||
public:
|
||||
int no_strings;
|
||||
|
||||
inline wxChoice(void) { no_strings = 0; }
|
||||
|
||||
inline 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 wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
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 wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
|
||||
virtual void Append(const wxString& item);
|
||||
virtual void Delete(const int n);
|
||||
virtual void Clear(void);
|
||||
virtual int GetSelection(void) const ;
|
||||
virtual void SetSelection(const int n);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual wxString GetString(const int n) const ;
|
||||
virtual void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
|
||||
virtual wxString GetStringSelection(void) const ;
|
||||
virtual bool SetStringSelection(const wxString& sel);
|
||||
|
||||
virtual inline int Number(void) const { return no_strings; }
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
virtual bool MSWCommand(const WXUINT param, const WXWORD id);
|
||||
|
||||
virtual inline void SetColumns(const int WXUNUSED(n) = 1 ) { /* No effect */ } ;
|
||||
virtual inline int GetColumns(void) const { return 1 ; };
|
||||
|
||||
virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
};
|
||||
|
||||
#endif
|
||||
// __CHOICEH__
|
||||
@@ -0,0 +1,111 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: clipbrd.h
|
||||
// Purpose: Clipboard functionality
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CLIPBRDH__
|
||||
#define __CLIPBRDH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "clipbrd.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/setup.h"
|
||||
|
||||
#if USE_CLIPBOARD
|
||||
|
||||
#include "wx/list.h"
|
||||
|
||||
bool WXDLLEXPORT wxOpenClipboard(void);
|
||||
bool WXDLLEXPORT wxClipboardOpen(void);
|
||||
bool WXDLLEXPORT wxCloseClipboard(void);
|
||||
bool WXDLLEXPORT wxEmptyClipboard(void);
|
||||
bool WXDLLEXPORT wxIsClipboardFormatAvailable(int dataFormat);
|
||||
bool WXDLLEXPORT wxSetClipboardData(int dataFormat, wxObject *obj, int width = 0, int height = 0);
|
||||
wxObject* WXDLLEXPORT wxGetClipboardData(int dataFormat, long *len = NULL);
|
||||
int WXDLLEXPORT wxEnumClipboardFormats(int dataFormat);
|
||||
int WXDLLEXPORT wxRegisterClipboardFormat(char *formatName);
|
||||
bool WXDLLEXPORT wxGetClipboardFormatName(int dataFormat, char *formatName, int maxCount);
|
||||
|
||||
/* The following is Matthew Flatt's implementation of the MSW
|
||||
* side of generic clipboard functionality.
|
||||
*/
|
||||
|
||||
/* A clipboard client holds data belonging to the clipboard.
|
||||
For plain text, a client is not necessary. */
|
||||
class WXDLLEXPORT wxClipboardClient : public wxObject
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxClipboardClient)
|
||||
|
||||
public:
|
||||
/* This list should be filled in with strings indicating the formats
|
||||
this client can provide. Almost all clients will provide "TEXT".
|
||||
Format names should be 4 characters long, so things will work
|
||||
out on the Macintosh */
|
||||
wxStringList formats;
|
||||
|
||||
/* This method is called when the client is losing the selection. */
|
||||
virtual void BeingReplaced(void) = 0;
|
||||
|
||||
/* This method is called when someone wants the data this client is
|
||||
supplying to the clipboard. "format" is a string indicating the
|
||||
format of the data - one of the strings from the "formats"
|
||||
list. "*size" should be filled with the size of the resulting
|
||||
data. In the case of text, "*size" does not count the
|
||||
NULL terminator. */
|
||||
virtual char *GetData(char *format, long *size) = 0;
|
||||
};
|
||||
|
||||
/* ONE instance of this class: */
|
||||
class WXDLLEXPORT wxClipboard : public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxClipboard)
|
||||
|
||||
public:
|
||||
wxClipboardClient *clipOwner;
|
||||
char *cbString, *sentString, *receivedString;
|
||||
void *receivedTargets;
|
||||
long receivedLength;
|
||||
#ifdef __XVIEW__
|
||||
long sel_owner;
|
||||
#endif
|
||||
|
||||
wxClipboard();
|
||||
~wxClipboard();
|
||||
|
||||
/* Set the clipboard data owner. "time" comes from the event record. */
|
||||
void SetClipboardClient(wxClipboardClient *, long time);
|
||||
|
||||
/* Set the clipboard string; does not require a client. */
|
||||
void SetClipboardString(char *, long time);
|
||||
|
||||
/* Get data from the clipboard in the format "TEXT". */
|
||||
char *GetClipboardString(long time);
|
||||
|
||||
/* Get data from the clipboard */
|
||||
char *GetClipboardData(char *format, long *length, long time);
|
||||
|
||||
/* Get the clipboard client directly. Will be NULL if clipboard data
|
||||
is a string, or if some other application owns the clipboard.
|
||||
This can be useful for shortcutting data translation, if the
|
||||
clipboard user can check for a specific client. (This is used
|
||||
by the wxMediaEdit class.) */
|
||||
wxClipboardClient *GetClipboardClient(void);
|
||||
};
|
||||
|
||||
/* Initialize wxTheClipboard. Can be called repeatedly */
|
||||
void WXDLLEXPORT wxInitClipboard(void);
|
||||
|
||||
/* The clipboard */
|
||||
extern wxClipboard* WXDLLEXPORT wxTheClipboard;
|
||||
|
||||
#endif // USE_CLIPBOARD
|
||||
#endif
|
||||
// __CLIPBRDH__
|
||||
|
After Width: | Height: | Size: 326 B |
@@ -0,0 +1,44 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colordlg.h
|
||||
// Purpose: wxColourDialog class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __COLORDLGH__
|
||||
#define __COLORDLGH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "colordlg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/setup.h"
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/cmndata.h"
|
||||
|
||||
/*
|
||||
* COLOUR DIALOG
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxColourDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxColourDialog)
|
||||
protected:
|
||||
wxColourData colourData;
|
||||
wxWindow *dialogParent;
|
||||
public:
|
||||
wxColourDialog(void);
|
||||
wxColourDialog(wxWindow *parent, wxColourData *data = NULL);
|
||||
|
||||
bool Create(wxWindow *parent, wxColourData *data = NULL);
|
||||
|
||||
int ShowModal(void);
|
||||
wxColourData& GetColourData(void) { return colourData; }
|
||||
};
|
||||
|
||||
#endif
|
||||
// __COLORDLGH__
|
||||
@@ -0,0 +1,62 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.h
|
||||
// Purpose: wxColour class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __COLOURH__
|
||||
#define __COLOURH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "colour.h"
|
||||
#endif
|
||||
|
||||
// Colour
|
||||
class WXDLLEXPORT wxColour: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxColour)
|
||||
public:
|
||||
wxColour(void);
|
||||
wxColour(const unsigned char r, const unsigned char g, const unsigned char b);
|
||||
wxColour(const wxColour& col);
|
||||
wxColour(const wxString& col);
|
||||
~wxColour(void) ;
|
||||
wxColour& operator =(const wxColour& src) ;
|
||||
wxColour& operator =(const wxString& src) ;
|
||||
inline int Ok(void) const { return (m_isInit) ; }
|
||||
|
||||
void Set(unsigned char r, unsigned char g, unsigned char b);
|
||||
|
||||
// Let's remove this inelegant function
|
||||
#if WXWIN_COMPATIBILITY
|
||||
void Get(unsigned char *r, unsigned char *g, unsigned char *b) const;
|
||||
#endif
|
||||
|
||||
inline unsigned char Red(void) const { return m_red; }
|
||||
inline unsigned char Green(void) const { return m_green; }
|
||||
inline unsigned char Blue(void) const { return m_blue; }
|
||||
|
||||
inline bool operator == (const wxColour& colour) { return (m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue); }
|
||||
|
||||
inline bool operator != (const wxColour& colour) { return (!(m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue)); }
|
||||
|
||||
WXCOLORREF GetPixel(void) const { return m_pixel; };
|
||||
|
||||
private:
|
||||
bool m_isInit;
|
||||
unsigned char m_red;
|
||||
unsigned char m_blue;
|
||||
unsigned char m_green;
|
||||
public:
|
||||
WXCOLORREF m_pixel ;
|
||||
};
|
||||
|
||||
#define wxColor wxColour
|
||||
|
||||
#endif
|
||||
// __COLOURH__
|
||||
@@ -0,0 +1,79 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: combobox.h
|
||||
// Purpose: wxComboBox class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __COMBOBOXH__
|
||||
#define __COMBOBOXH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "combobox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/choice.h"
|
||||
|
||||
#if USE_COMBOBOX
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxComboBoxNameStr;
|
||||
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||
|
||||
// Combobox item
|
||||
class WXDLLEXPORT wxComboBox: public wxChoice
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxComboBox)
|
||||
|
||||
public:
|
||||
inline wxComboBox(void) {}
|
||||
|
||||
inline wxComboBox(wxWindow *parent, const wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const int n = 0, const wxString choices[] = NULL,
|
||||
const long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr)
|
||||
{
|
||||
Create(parent, id, value, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const int n = 0, const wxString choices[] = NULL,
|
||||
const long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr);
|
||||
|
||||
// List functions: see wxChoice
|
||||
|
||||
// Text field functions
|
||||
virtual wxString GetValue(void) const ;
|
||||
virtual void SetValue(const wxString& value);
|
||||
|
||||
// Clipboard operations
|
||||
virtual void Copy(void);
|
||||
virtual void Cut(void);
|
||||
virtual void Paste(void);
|
||||
virtual void SetInsertionPoint(const long pos);
|
||||
virtual void SetInsertionPointEnd(void);
|
||||
virtual long GetInsertionPoint(void) const ;
|
||||
virtual long GetLastPosition(void) const ;
|
||||
virtual void Replace(const long from, const long to, const wxString& value);
|
||||
virtual void Remove(const long from, const long to);
|
||||
virtual void SetSelection(const long from, const long to);
|
||||
virtual void SetEditable(const bool editable);
|
||||
|
||||
virtual bool MSWCommand(const WXUINT param, const WXWORD id);
|
||||
};
|
||||
|
||||
#endif // USE_COMBOBOX
|
||||
#endif
|
||||
// __COMBOBOXH__
|
||||
@@ -0,0 +1,86 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: control.h
|
||||
// Purpose: wxControl class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CONTROLH__
|
||||
#define __CONTROLH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "control.h"
|
||||
#endif
|
||||
|
||||
#include "wx/window.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/validate.h"
|
||||
|
||||
// General item class
|
||||
class WXDLLEXPORT wxControl: public wxWindow
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxControl)
|
||||
public:
|
||||
wxControl(void);
|
||||
~wxControl(void);
|
||||
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) = 0; // Simulates an event
|
||||
virtual void ProcessCommand(wxCommandEvent& event); // Calls the callback and
|
||||
// appropriate event handlers
|
||||
virtual void SetClientSize(const int width, const int height);
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual wxString GetLabel(void) const ;
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
inline virtual void SetButtonColour(const wxColour& WXUNUSED(col)) { }
|
||||
inline wxColour*GetButtonColour(void) const { return NULL; }
|
||||
|
||||
inline virtual void SetLabelFont(const wxFont& font);
|
||||
inline virtual void SetButtonFont(const wxFont& font);
|
||||
inline wxFont *GetLabelFont(void) const ;
|
||||
inline wxFont *GetButtonFont(void) const ;
|
||||
#endif
|
||||
|
||||
// Places item in centre of panel - so can't be used BEFORE panel->Fit()
|
||||
void Centre(const int direction = wxHORIZONTAL);
|
||||
inline void Callback(const wxFunction function); // Adds callback
|
||||
|
||||
// MSW-specific
|
||||
|
||||
// Window procedure
|
||||
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
virtual void MSWOnMouseMove(const int x, const int y, const WXUINT flags);
|
||||
virtual bool MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam);
|
||||
|
||||
void OnEraseBackground(wxEraseEvent& event);
|
||||
|
||||
// For ownerdraw items
|
||||
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *WXUNUSED(item)) { return FALSE; };
|
||||
virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *WXUNUSED(item)) { return FALSE; };
|
||||
|
||||
inline wxFunction GetCallback(void) { return m_callback; }
|
||||
inline wxList& GetSubcontrols(void) { return m_subControls; }
|
||||
protected:
|
||||
wxFunction m_callback; // Callback associated with the window
|
||||
|
||||
// MSW implementation
|
||||
wxList m_subControls; // For controls like radiobuttons which are really composite
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
inline void wxControl::Callback(const wxFunction function) { m_callback = function; }; // Adds callback
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
inline wxFont *wxControl::GetLabelFont(void) const { return GetFont() ; }
|
||||
inline wxFont *wxControl::GetButtonFont(void) const { return GetFont() ; }
|
||||
inline void wxControl::SetLabelFont(const wxFont& font) { SetFont(font); }
|
||||
inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// __CONTROLH__
|
||||
@@ -0,0 +1,22 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: curico.h
|
||||
// Purpose: Icon and cursor functions
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
HICON ReadIconFile( char *szFileName, HINSTANCE hInst,
|
||||
int *W = 0, int *H = 0);
|
||||
HCURSOR ReadCursorFile( char *szFileName, HINSTANCE hInst,
|
||||
int *W = 0, int *H = 0, int *XHot = 0, int *YHot = 0);
|
||||
HCURSOR IconToCursor( char *szFileName, HINSTANCE hInst, int XHot, int YHot,
|
||||
int *W = 0, int *H = 0);
|
||||
HICON CursorToIcon( char *szFileName, HINSTANCE hInst,
|
||||
int *W = 0, int *H = 0);
|
||||
|
||||
HCURSOR MakeCursorFromBitmap(HINSTANCE hInst, HBITMAP hBitmap, POINT *pPoint);
|
||||
HICON MakeIconFromBitmap(HINSTANCE hInst, HBITMAP hBitmap);
|
||||
@@ -0,0 +1,63 @@
|
||||
// PRIVATE STUFF FOLLOWS UNTIL END
|
||||
|
||||
// Header signatures for various resources
|
||||
#define BFT_ICON 0x4349 /* 'IC' */
|
||||
#define BFT_BITMAP 0x4d42 /* 'BM' */
|
||||
#define BFT_CURSOR 0x5450 /* 'PT' */
|
||||
|
||||
// This WIDTHBYTES macro determines the number of BYTES per scan line.
|
||||
#define WIDTHBYTES( i) ((i + 31) / 32 * 4)
|
||||
#define IS_WIN30_DIB( lpbi) ((*(LPDWORD)( lpbi)) == sizeof( BITMAPINFOHEADER))
|
||||
|
||||
WORD DIBNumColors(LPSTR pv);
|
||||
WORD PaletteSize(LPSTR lpbi);
|
||||
|
||||
|
||||
struct tagCURFILEHEADER { WORD wReserved; // Always 0
|
||||
WORD wResourceType; // 2 = cursor
|
||||
WORD wResourceCount; // Number of icons in the file
|
||||
};
|
||||
|
||||
typedef struct tagCURFILEHEADER CURFILEHEADER;
|
||||
|
||||
struct tagCURFILERES {
|
||||
BYTE bWidth; // Width of image
|
||||
BYTE bHeight; // Height of image
|
||||
BYTE bColorCount; // Number of colors in image (2, 8, or 16)
|
||||
BYTE bReserved1; // Reserved
|
||||
WORD wXHotspot; // x coordinate of hotspot
|
||||
WORD wYHotspot; // y coordinate of hotspot
|
||||
DWORD dwDIBSize; // Size of DIB for this image
|
||||
DWORD dwDIBOffset; // Offset to DIB for this image
|
||||
};
|
||||
|
||||
typedef struct tagCURFILERES CURFILERES;
|
||||
|
||||
HANDLE ReadCur( LPSTR szFileName, LPPOINT lpptHotSpot, int *W = 0, int *H = 0);
|
||||
HBITMAP ColorDDBToMonoDDB( HBITMAP hbm);
|
||||
HCURSOR MakeCursor( HANDLE hDIB, LPPOINT lpptHotSpot, HINSTANCE hInst);
|
||||
|
||||
struct tagICONFILEHEADER {
|
||||
WORD wReserved; // Always 0
|
||||
WORD wResourceType; // 1 = icon
|
||||
WORD wResourceCount; // Number of icons in the file
|
||||
};
|
||||
|
||||
typedef struct tagICONFILEHEADER ICONFILEHEADER;
|
||||
|
||||
struct tagICONFILERES {
|
||||
BYTE bWidth; // Width of image
|
||||
BYTE bHeight; // Height of image
|
||||
BYTE bColorCount; // Number of colors in image (2, 8, or 16)
|
||||
BYTE bReserved1; // Reserved
|
||||
WORD wReserved2;
|
||||
WORD wReserved3;
|
||||
DWORD dwDIBSize; // Size of DIB for this image
|
||||
DWORD dwDIBOffset; // Offset to DIB for this image
|
||||
};
|
||||
|
||||
typedef struct tagICONFILERES ICONFILERES;
|
||||
|
||||
HANDLE ReadIcon( char *szFileName, int *W = 0, int *H = 0);
|
||||
HICON MakeIcon( HANDLE hDIB, HINSTANCE hInst);
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: cursor.h
|
||||
// Purpose: wxCursor class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CURSORH__
|
||||
#define __CURSORH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "cursor.h"
|
||||
#endif
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
class WXDLLEXPORT wxCursorRefData: public wxBitmapRefData
|
||||
{
|
||||
friend class WXDLLEXPORT wxBitmap;
|
||||
friend class WXDLLEXPORT wxCursor;
|
||||
public:
|
||||
wxCursorRefData(void);
|
||||
~wxCursorRefData(void);
|
||||
|
||||
protected:
|
||||
WXHCURSOR m_hCursor;
|
||||
bool m_destroyCursor;
|
||||
};
|
||||
|
||||
#define M_CURSORDATA ((wxCursorRefData *)m_refData)
|
||||
#define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData)
|
||||
|
||||
// Cursor
|
||||
class WXDLLEXPORT wxCursor: public wxBitmap
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCursor)
|
||||
|
||||
public:
|
||||
wxCursor(void);
|
||||
|
||||
// Copy constructors
|
||||
inline wxCursor(const wxCursor& cursor) { Ref(cursor); }
|
||||
inline wxCursor(const wxCursor* cursor) { /* UnRef(); */ if (cursor) Ref(*cursor); }
|
||||
|
||||
wxCursor(const char bits[], const int width, const int height, const int hotSpotX = -1, const int hotSpotY = -1,
|
||||
const char maskBits[] = NULL);
|
||||
wxCursor(const wxString& name, const long flags = wxBITMAP_TYPE_CUR_RESOURCE,
|
||||
const int hotSpotX = 0, const int hotSpotY = 0);
|
||||
wxCursor(const int cursor_type);
|
||||
~wxCursor(void);
|
||||
|
||||
virtual bool Ok(void) const { return (m_refData != NULL && M_CURSORDATA->m_hCursor) ; }
|
||||
|
||||
inline wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; }
|
||||
inline bool operator == (const wxCursor& cursor) { return m_refData == cursor.m_refData; }
|
||||
inline bool operator != (const wxCursor& cursor) { return m_refData != cursor.m_refData; }
|
||||
|
||||
void SetHCURSOR(WXHCURSOR cursor);
|
||||
inline WXHCURSOR GetHCURSOR(void) const { return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0); }
|
||||
|
||||
bool FreeResource(bool force = FALSE);
|
||||
};
|
||||
|
||||
#endif
|
||||
// __CURSORH__
|
||||
@@ -0,0 +1,65 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dcclient.h
|
||||
// Purpose: wxClientDC class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DCCLIENTH__
|
||||
#define __DCCLIENTH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dcclient.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dc.h"
|
||||
|
||||
class WXDLLEXPORT wxClientDC: public wxDC
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxClientDC)
|
||||
|
||||
public:
|
||||
wxClientDC(void);
|
||||
|
||||
// Create a DC corresponding to a canvas
|
||||
wxClientDC(wxWindow *win);
|
||||
|
||||
~wxClientDC(void);
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxWindowDC: public wxDC
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxWindowDC)
|
||||
|
||||
public:
|
||||
wxWindowDC(void);
|
||||
|
||||
// Create a DC corresponding to a canvas
|
||||
wxWindowDC(wxWindow *win);
|
||||
|
||||
~wxWindowDC(void);
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxPaintDC: public wxDC
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPaintDC)
|
||||
|
||||
public:
|
||||
wxPaintDC(void);
|
||||
|
||||
// Create a DC corresponding to a canvas
|
||||
wxPaintDC(wxWindow *win);
|
||||
|
||||
~wxPaintDC(void);
|
||||
|
||||
protected:
|
||||
static WXHDC m_staticPaintHDC ;
|
||||
static int m_staticPaintCount ;
|
||||
};
|
||||
|
||||
#endif
|
||||
// __DCCLIENTH__
|
||||
@@ -0,0 +1,35 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dcmemory.h
|
||||
// Purpose: wxMemoryDC class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DCMEMORYH__
|
||||
#define __DCMEMORYH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dcmemory.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dcclient.h"
|
||||
|
||||
class WXDLLEXPORT wxMemoryDC: public wxDC
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
|
||||
|
||||
public:
|
||||
wxMemoryDC(void);
|
||||
wxMemoryDC(wxDC *dc); // Create compatible DC
|
||||
|
||||
~wxMemoryDC(void);
|
||||
virtual void SelectObject(const wxBitmap& bitmap);
|
||||
virtual void GetSize(int* width, int* height) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
// __DCMEMORYH__
|
||||
@@ -0,0 +1,38 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dcprint.h
|
||||
// Purpose: wxPrinterDC class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DCPRINTH__
|
||||
#define __DCPRINTH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dcprint.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dc.h"
|
||||
|
||||
class WXDLLEXPORT wxPrinterDC: public wxDC
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS(wxPrinterDC)
|
||||
|
||||
// Create a printer DC
|
||||
wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, const bool interactive = TRUE, const int orientation = wxPORTRAIT);
|
||||
wxPrinterDC(WXHDC theDC);
|
||||
|
||||
~wxPrinterDC(void);
|
||||
};
|
||||
|
||||
// Gets an HDC for the default printer configuration
|
||||
WXHDC WXDLLEXPORT wxGetPrinterDC(int orientation);
|
||||
|
||||
#endif
|
||||
// __DCPRINTH__
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dcscreen.h
|
||||
// Purpose: wxScreenDC class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DCSCREENH__
|
||||
#define __DCSCREENH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dcscreen.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dc.h"
|
||||
|
||||
class WXDLLEXPORT wxScreenDC: public wxDC
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxScreenDC)
|
||||
|
||||
public:
|
||||
// Create a DC representing the whole screen
|
||||
wxScreenDC(void);
|
||||
~wxScreenDC(void);
|
||||
|
||||
// Compatibility with X's requirements for
|
||||
// drawing on top of all windows
|
||||
static bool StartDrawingOnTop(wxWindow *window) { return TRUE; }
|
||||
static bool StartDrawingOnTop(wxRectangle *rect = NULL) { return TRUE; }
|
||||
static bool EndDrawingOnTop(void) { return TRUE; }
|
||||
};
|
||||
|
||||
#endif
|
||||
// __DCSCREENH__
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dde.h
|
||||
// Purpose: DDE class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DDEH__
|
||||
#define __DDEH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dde.h"
|
||||
#endif
|
||||
|
||||
#include "wx/ipcbase.h"
|
||||
|
||||
/*
|
||||
* Mini-DDE implementation
|
||||
|
||||
Most transactions involve a topic name and an item name (choose these
|
||||
as befits your application).
|
||||
|
||||
A client can:
|
||||
|
||||
- ask the server to execute commands (data) associated with a topic
|
||||
- request data from server by topic and item
|
||||
- poke data into the server
|
||||
- ask the server to start an advice loop on topic/item
|
||||
- ask the server to stop an advice loop
|
||||
|
||||
A server can:
|
||||
|
||||
- respond to execute, request, poke and advice start/stop
|
||||
- send advise data to client
|
||||
|
||||
Note that this limits the server in the ways it can send data to the
|
||||
client, i.e. it can't send unsolicited information.
|
||||
*
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxDDEServer;
|
||||
class WXDLLEXPORT wxDDEClient;
|
||||
|
||||
class WXDLLEXPORT wxDDEConnection: public wxConnectionBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDDEConnection)
|
||||
public:
|
||||
char *buf_ptr;
|
||||
wxString topic_name;
|
||||
int buf_size;
|
||||
wxDDEServer *server;
|
||||
wxDDEClient *client;
|
||||
|
||||
WXHCONV hConv;
|
||||
char *sending_data;
|
||||
int data_size;
|
||||
int data_type;
|
||||
|
||||
wxDDEConnection(char *buffer, int size);
|
||||
wxDDEConnection(void);
|
||||
~wxDDEConnection(void);
|
||||
|
||||
// Calls that CLIENT can make
|
||||
virtual bool Execute(char *data, int size = -1, int format = wxCF_TEXT);
|
||||
virtual bool Execute(const wxString& str) { return Execute((char *)(const char *)str, -1, wxCF_TEXT); }
|
||||
virtual char *Request(const wxString& item, int *size = NULL, int format = wxCF_TEXT);
|
||||
virtual bool Poke(const wxString& item, char *data, int size = -1, int format = wxCF_TEXT);
|
||||
virtual bool StartAdvise(const wxString& item);
|
||||
virtual bool StopAdvise(const wxString& item);
|
||||
|
||||
// Calls that SERVER can make
|
||||
virtual bool Advise(const wxString& item, char *data, int size = -1, int format = wxCF_TEXT);
|
||||
|
||||
// Calls that both can make
|
||||
virtual bool Disconnect(void);
|
||||
|
||||
// Callbacks to SERVER - override at will
|
||||
virtual bool OnExecute(const wxString& topic, char *data, int size, int format) { return FALSE; };
|
||||
virtual char *OnRequest(const wxString& topic, const wxString& item, int *size, int format) { return NULL; };
|
||||
virtual bool OnPoke(const wxString& topic, const wxString& item, char *data, int size, int format) { return FALSE; };
|
||||
virtual bool OnStartAdvise(const wxString& topic, const wxString& item) { return FALSE; };
|
||||
virtual bool OnStopAdvise(const wxString& topic, const wxString& item) { return FALSE; };
|
||||
|
||||
// Callbacks to CLIENT - override at will
|
||||
virtual bool OnAdvise(const wxString& topic, const wxString& item, char *data, int size, int format) { return FALSE; };
|
||||
|
||||
// Callbacks to BOTH
|
||||
|
||||
// Default behaviour is to delete connection and return TRUE
|
||||
virtual bool OnDisconnect(void);
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxDDEServer: public wxServerBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDDEServer)
|
||||
public:
|
||||
|
||||
wxDDEServer(void);
|
||||
~wxDDEServer(void);
|
||||
bool Create(const wxString& server_name); // Returns FALSE if can't create server (e.g. port
|
||||
// number is already in use)
|
||||
virtual wxConnectionBase *OnAcceptConnection(const wxString& topic);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Implementation
|
||||
|
||||
// Find/delete wxDDEConnection corresponding to the HCONV
|
||||
wxDDEConnection *FindConnection(WXHCONV conv);
|
||||
bool DeleteConnection(WXHCONV conv);
|
||||
inline wxString& GetServiceName(void) const { return (wxString&) service_name; }
|
||||
inline wxList& GetConnections(void) const { return (wxList&) connections; }
|
||||
|
||||
protected:
|
||||
int lastError;
|
||||
wxString service_name;
|
||||
wxList connections;
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxDDEClient: public wxClientBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDDEClient)
|
||||
public:
|
||||
wxDDEClient(void);
|
||||
~wxDDEClient(void);
|
||||
bool ValidHost(const wxString& host);
|
||||
virtual wxConnectionBase *MakeConnection(const wxString& host, const wxString& server, const wxString& topic);
|
||||
// Call this to make a connection.
|
||||
// Returns NULL if cannot.
|
||||
virtual wxConnectionBase *OnMakeConnection(void); // Tailor this to return own connection.
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Implementation
|
||||
|
||||
// Find/delete wxDDEConnection corresponding to the HCONV
|
||||
wxDDEConnection *FindConnection(WXHCONV conv);
|
||||
bool DeleteConnection(WXHCONV conv);
|
||||
inline wxList& GetConnections(void) const { return (wxList&) connections; }
|
||||
|
||||
protected:
|
||||
int lastError;
|
||||
wxList connections;
|
||||
};
|
||||
|
||||
void WXDLLEXPORT wxDDEInitialize();
|
||||
void WXDLLEXPORT wxDDECleanUp();
|
||||
|
||||
// Compatibility
|
||||
#if WXWIN_COMPATIBILITY
|
||||
#define wxServer wxDDEServer
|
||||
#define wxClient wxDDEClient
|
||||
#define wxConnection wxDDEConnection
|
||||
#define wxIPCInitialize wxDDEInitialize
|
||||
#define wxIPCCleanUp wxDDECleanUp
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// __DDEH__
|
||||
@@ -0,0 +1,118 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dialog.h
|
||||
// Purpose: wxDialog class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DIALOGH__
|
||||
#define __DIALOGH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dialog.h"
|
||||
#endif
|
||||
|
||||
#include "wx/panel.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr;
|
||||
|
||||
// Dialog boxes
|
||||
class WXDLLEXPORT wxDialog: public wxPanel
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||
protected:
|
||||
bool m_modalShowing;
|
||||
public:
|
||||
|
||||
wxDialog(void);
|
||||
|
||||
// Constructor with a modal flag, but no window id - the old convention
|
||||
inline wxDialog(wxWindow *parent,
|
||||
const wxString& title, bool modal,
|
||||
const int x = -1, const int y= -1, const int width = 500, const int height = 500,
|
||||
const long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr)
|
||||
{
|
||||
long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ;
|
||||
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), style|modalStyle, name);
|
||||
}
|
||||
|
||||
// Constructor with no modal flag - the new convention.
|
||||
inline wxDialog(wxWindow *parent, const wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id,
|
||||
const wxString& title, // bool modal = FALSE, // TODO make this a window style?
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr);
|
||||
|
||||
~wxDialog(void);
|
||||
|
||||
virtual bool Destroy(void);
|
||||
void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
|
||||
void SetClientSize(const int width, const int height);
|
||||
void GetPosition(int *x, int *y) const;
|
||||
bool Show(const bool show);
|
||||
bool IsShown(void) const ;
|
||||
void Iconize(const bool iconize);
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
inline bool Iconized(void) const { return IsIconized(); };
|
||||
#endif
|
||||
|
||||
virtual bool IsIconized(void) const;
|
||||
void Fit(void);
|
||||
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle(void) const ;
|
||||
|
||||
bool OnClose(void);
|
||||
void OnCharHook(wxKeyEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
void SetModal(const bool flag);
|
||||
|
||||
virtual void Centre(const int direction = wxBOTH);
|
||||
virtual bool IsModal(void) const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
|
||||
|
||||
// For now, same as Show(TRUE) but returns return code
|
||||
virtual int ShowModal(void);
|
||||
virtual void EndModal(int retCode);
|
||||
|
||||
// Standard buttons
|
||||
void OnOK(wxCommandEvent& event);
|
||||
void OnApply(wxCommandEvent& event);
|
||||
void OnCancel(wxCommandEvent& event);
|
||||
|
||||
// Responds to colour changes
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
// IMPLEMENTATION
|
||||
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
virtual long MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
virtual bool MSWProcessMessage(WXMSG* pMsg);
|
||||
// virtual bool MSWOnEraseBkgnd(WXHDC pDC);
|
||||
virtual bool MSWOnClose(void);
|
||||
inline bool IsModalShowing() const { return m_modalShowing ; }
|
||||
virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// __DIALOGH__
|
||||
@@ -0,0 +1,26 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dib.h
|
||||
// Purpose: Routines for loading and saving DIBs
|
||||
// Author: Various
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Save (device dependent) wxBitmap as a DIB
|
||||
bool wxSaveBitmap(char *filename, wxBitmap *bitmap, wxColourMap *colourmap = NULL);
|
||||
|
||||
// Load device independent bitmap into device dependent bitmap
|
||||
wxBitmap *wxLoadBitmap(char *filename, wxColourMap **colourmap = NULL);
|
||||
|
||||
// Load into existing bitmap;
|
||||
bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxColourMap **pal = NULL);
|
||||
|
||||
HANDLE BitmapToDIB (HBITMAP hBitmap, HPALETTE hPal);
|
||||
BOOL ReadDIB(LPSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette);
|
||||
HANDLE ReadDIB2(LPSTR lpFileName);
|
||||
LPSTR FindDIBBits (LPSTR lpbi);
|
||||
HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo);
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dibutils.h
|
||||
// Purpose: Utilities for DIBs
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Microsoft, Julian Smart
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
(C) Copyright 1994 Microsoft Corp. All rights reserved.
|
||||
|
||||
You have a royalty-free right to use, modify, reproduce and
|
||||
distribute the Sample Files (and/or any modified version) in
|
||||
any way you find useful, provided that you agree that
|
||||
Microsoft has no warranty obligations or liability for any
|
||||
Sample Application Files which are modified.
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
Functions for handling Device Independent Bitmaps and clearing the
|
||||
System Palette.
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef SAMPLES_UTILS_H
|
||||
#define SAMPLES_UTILS_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dibutils.h"
|
||||
#endif
|
||||
|
||||
typedef LPBITMAPINFOHEADER PDIB;
|
||||
typedef HANDLE HDIB;
|
||||
|
||||
/***************************************************************************
|
||||
External function declarations
|
||||
**************************************************************************/
|
||||
|
||||
void ClearSystemPalette(void);
|
||||
PDIB DibOpenFile(LPSTR szFile);
|
||||
int DibWriteFile(LPSTR szFile, LPBITMAPINFOHEADER lpbi);
|
||||
BOOL DibSetUsage(PDIB pdib, HPALETTE hpal,UINT wUsage);
|
||||
PDIB DibCreate(int bits, int dx, int dy);
|
||||
BOOL DibMapToPalette(PDIB pdib, HPALETTE hpal);
|
||||
HPALETTE MakePalette(const BITMAPINFO FAR* Info, UINT flags);
|
||||
|
||||
/****************************************************************************
|
||||
Internal function declarations
|
||||
***************************************************************************/
|
||||
|
||||
PDIB DibReadBitmapInfo(HFILE fh);
|
||||
|
||||
/****************************************************************************
|
||||
DIB macros.
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef WIN32
|
||||
#define HandleFromDib(lpbi) GlobalHandle(lpbi)
|
||||
#else
|
||||
#define HandleFromDib(lpbi) (HANDLE)GlobalHandle(SELECTOROF(lpbi))
|
||||
#endif
|
||||
|
||||
#define DibFromHandle(h) (PDIB)GlobalLock(h)
|
||||
|
||||
#define DibFree(pdib) GlobalFreePtr(pdib)
|
||||
|
||||
#define WIDTHBYTES(i) ((unsigned)((i+31)&(~31))/8) /* ULONG aligned ! */
|
||||
|
||||
#define DibWidth(lpbi) (UINT)(((LPBITMAPINFOHEADER)(lpbi))->biWidth)
|
||||
#define DibHeight(lpbi) (UINT)(((LPBITMAPINFOHEADER)(lpbi))->biHeight)
|
||||
#define DibBitCount(lpbi) (UINT)(((LPBITMAPINFOHEADER)(lpbi))->biBitCount)
|
||||
#define DibCompression(lpbi) (DWORD)(((LPBITMAPINFOHEADER)(lpbi))->biCompression)
|
||||
|
||||
#define DibWidthBytesN(lpbi, n) (UINT)WIDTHBYTES((UINT)(lpbi)->biWidth * (UINT)(n))
|
||||
#define DibWidthBytes(lpbi) DibWidthBytesN(lpbi, (lpbi)->biBitCount)
|
||||
|
||||
#define DibSizeImage(lpbi) ((lpbi)->biSizeImage == 0 \
|
||||
? ((DWORD)(UINT)DibWidthBytes(lpbi) * (DWORD)(UINT)(lpbi)->biHeight) \
|
||||
: (lpbi)->biSizeImage)
|
||||
|
||||
#define DibSize(lpbi) ((lpbi)->biSize + (lpbi)->biSizeImage + (int)(lpbi)->biClrUsed * sizeof(RGBQUAD))
|
||||
#define DibPaletteSize(lpbi) (DibNumColors(lpbi) * sizeof(RGBQUAD))
|
||||
|
||||
#define DibFlipY(lpbi, y) ((int)(lpbi)->biHeight-1-(y))
|
||||
|
||||
//HACK for NT BI_BITFIELDS DIBs
|
||||
#ifdef WIN32
|
||||
#define DibPtr(lpbi) ((lpbi)->biCompression == BI_BITFIELDS \
|
||||
? (LPVOID)(DibColors(lpbi) + 3) \
|
||||
: (LPVOID)(DibColors(lpbi) + (UINT)(lpbi)->biClrUsed))
|
||||
#else
|
||||
#define DibPtr(lpbi) (LPVOID)(DibColors(lpbi) + (UINT)(lpbi)->biClrUsed)
|
||||
#endif
|
||||
|
||||
#define DibColors(lpbi) ((RGBQUAD FAR *)((LPBYTE)(lpbi) + (int)(lpbi)->biSize))
|
||||
|
||||
#define DibNumColors(lpbi) ((lpbi)->biClrUsed == 0 && (lpbi)->biBitCount <= 8 \
|
||||
? (int)(1 << (int)(lpbi)->biBitCount) \
|
||||
: (int)(lpbi)->biClrUsed)
|
||||
|
||||
#define DibXYN(lpbi,pb,x,y,n) (LPVOID)( \
|
||||
(BYTE _huge *)(pb) + \
|
||||
(UINT)((UINT)(x) * (UINT)(n) / 8u) + \
|
||||
((DWORD)DibWidthBytesN(lpbi,n) * (DWORD)(UINT)(y)))
|
||||
|
||||
#define DibXY(lpbi,x,y) DibXYN(lpbi,DibPtr(lpbi),x,y,(lpbi)->biBitCount)
|
||||
|
||||
#define FixBitmapInfo(lpbi) if ((lpbi)->biSizeImage == 0) \
|
||||
(lpbi)->biSizeImage = DibSizeImage(lpbi); \
|
||||
if ((lpbi)->biClrUsed == 0) \
|
||||
(lpbi)->biClrUsed = DibNumColors(lpbi); \
|
||||
if ((lpbi)->biCompression == BI_BITFIELDS && (lpbi)->biClrUsed == 0) \
|
||||
; // (lpbi)->biClrUsed = 3;
|
||||
|
||||
#define DibInfo(pDIB) ((BITMAPINFO FAR *)(pDIB))
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
#ifndef BI_BITFIELDS
|
||||
#define BI_BITFIELDS 3
|
||||
#endif
|
||||
|
||||
#ifndef HALFTONE
|
||||
#define HALFTONE COLORONCOLOR
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,47 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dirdlg.h
|
||||
// Purpose: wxDirDialog class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DIRDLGH__
|
||||
#define __DIRDLGH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dirdlg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dialog.h"
|
||||
|
||||
class WXDLLEXPORT wxDirDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDirDialog)
|
||||
public:
|
||||
wxDirDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr,
|
||||
const wxString& defaultPath = "",
|
||||
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 SetStyle(long style) { m_dialogStyle = style; }
|
||||
|
||||
inline wxString GetMessage(void) const { return m_message; }
|
||||
inline wxString GetPath(void) const { return m_path; }
|
||||
inline long GetStyle(void) const { return m_dialogStyle; }
|
||||
|
||||
int ShowModal(void);
|
||||
|
||||
protected:
|
||||
wxString m_message;
|
||||
long m_dialogStyle;
|
||||
wxWindow * m_parent;
|
||||
wxString m_path;
|
||||
};
|
||||
|
||||
#endif
|
||||
// __DIRDLGH__
|
||||
|
After Width: | Height: | Size: 630 B |
@@ -0,0 +1,88 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: filedlg.h
|
||||
// Purpose: wxFileDialog class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __FILEDLGH__
|
||||
#define __FILEDLGH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "filedlg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dialog.h"
|
||||
|
||||
/*
|
||||
* File selector
|
||||
*/
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr;
|
||||
WXDLLEXPORT_DATA(extern const char*) wxFileSelectorDefaultWildcardStr;
|
||||
|
||||
class WXDLLEXPORT wxFileDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxFileDialog)
|
||||
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;
|
||||
public:
|
||||
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);
|
||||
};
|
||||
|
||||
#define wxOPEN 1
|
||||
#define wxSAVE 2
|
||||
#define wxOVERWRITE_PROMPT 4
|
||||
#define wxHIDE_READONLY 8
|
||||
|
||||
// File selector - backward compatibility
|
||||
char* WXDLLEXPORT 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);
|
||||
|
||||
// An extended version of wxFileSelector
|
||||
char* WXDLLEXPORT wxFileSelectorEx(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,
|
||||
const char *default_filename = NULL, int *indexDefaultExtension = NULL,
|
||||
const char *wildcard = wxFileSelectorDefaultWildcardStr, const int flags = 0,
|
||||
wxWindow *parent = NULL, const int x = -1, const int y = -1);
|
||||
|
||||
// Generic file load dialog
|
||||
char* WXDLLEXPORT wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL);
|
||||
|
||||
// Generic file save dialog
|
||||
char* WXDLLEXPORT wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL);
|
||||
|
||||
#endif
|
||||
// __FILEDLGH__
|
||||
@@ -0,0 +1,98 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: font.h
|
||||
// Purpose: wxFont class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __FONTH__
|
||||
#define __FONTH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "font.h"
|
||||
#endif
|
||||
|
||||
#include "wx/gdiobj.h"
|
||||
|
||||
class WXDLLEXPORT wxFont;
|
||||
|
||||
class WXDLLEXPORT wxFontRefData: public wxGDIRefData
|
||||
{
|
||||
friend class WXDLLEXPORT wxFont;
|
||||
public:
|
||||
wxFontRefData(void);
|
||||
~wxFontRefData(void);
|
||||
protected:
|
||||
bool m_temporary; // If TRUE, the pointer to the actual font
|
||||
// is temporary and SHOULD NOT BE DELETED by
|
||||
// destructor
|
||||
int m_pointSize;
|
||||
int m_family;
|
||||
int m_fontId;
|
||||
int m_style;
|
||||
int m_weight;
|
||||
bool m_underlined;
|
||||
wxString m_faceName;
|
||||
WXHFONT m_hFont;
|
||||
|
||||
};
|
||||
|
||||
#define M_FONTDATA ((wxFontRefData *)m_refData)
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||
|
||||
// Font
|
||||
class WXDLLEXPORT wxFont: public wxGDIObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxFont)
|
||||
public:
|
||||
wxFont(void);
|
||||
wxFont(int PointSize, int Family, int Style, int Weight, bool underlined = FALSE, const wxString& Face = wxEmptyString);
|
||||
inline wxFont(const wxFont& font) { Ref(font); }
|
||||
inline wxFont(const wxFont* font) { /* UnRef(); */ if (font) Ref(*font); }
|
||||
|
||||
~wxFont(void);
|
||||
|
||||
bool Create(int PointSize, int Family, int Style, int Weight, bool underlined = FALSE, const wxString& Face = wxEmptyString);
|
||||
|
||||
// Internal
|
||||
virtual bool RealizeResource(void);
|
||||
virtual WXHANDLE GetResourceHandle(void) ;
|
||||
virtual bool FreeResource(bool force = FALSE);
|
||||
/*
|
||||
virtual bool UseResource(void);
|
||||
virtual bool ReleaseResource(void);
|
||||
*/
|
||||
|
||||
virtual bool IsFree(void);
|
||||
virtual bool Ok(void) const { return (m_refData != NULL) ; }
|
||||
|
||||
inline int GetPointSize(void) const { return M_FONTDATA->m_pointSize; }
|
||||
inline int GetFamily(void) const { return M_FONTDATA->m_family; }
|
||||
inline int GetFontId(void) const { return M_FONTDATA->m_fontId; } /* New font system */
|
||||
inline int GetStyle(void) const { return M_FONTDATA->m_style; }
|
||||
inline int GetWeight(void) const { return M_FONTDATA->m_weight; }
|
||||
wxString GetFamilyString(void) const ;
|
||||
wxString GetFaceName(void) const ;
|
||||
wxString GetStyleString(void) const ;
|
||||
wxString GetWeightString(void) const ;
|
||||
inline bool GetUnderlined(void) const { return M_FONTDATA->m_underlined; }
|
||||
|
||||
void SetPointSize(const int pointSize);
|
||||
void SetFamily(const int family);
|
||||
void SetStyle(const int style);
|
||||
void SetWeight(const int weight);
|
||||
void SetFaceName(const wxString& faceName);
|
||||
void SetUnderlined(const bool underlined);
|
||||
|
||||
inline wxFont& operator = (const wxFont& font) { if (*this == font) return (*this); Ref(font); return *this; }
|
||||
inline bool operator == (const wxFont& font) { return m_refData == font.m_refData; }
|
||||
inline bool operator != (const wxFont& font) { return m_refData != font.m_refData; }
|
||||
};
|
||||
|
||||
#endif
|
||||
// __FONTH__
|
||||
@@ -0,0 +1,44 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: fontdlg.h
|
||||
// Purpose: wxFontDialog class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __FONTDLGH__
|
||||
#define __FONTDLGH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "fontdlg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/cmndata.h"
|
||||
|
||||
/*
|
||||
* FONT DIALOG
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxFontDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxFontDialog)
|
||||
protected:
|
||||
wxWindow *dialogParent;
|
||||
wxFontData fontData;
|
||||
public:
|
||||
wxFontDialog(void);
|
||||
wxFontDialog(wxWindow *parent, wxFontData *data = NULL);
|
||||
|
||||
bool Create(wxWindow *parent, wxFontData *data = NULL);
|
||||
|
||||
int ShowModal(void);
|
||||
wxFontData& GetFontData(void) { return fontData; }
|
||||
};
|
||||
|
||||
#endif
|
||||
// __FONTDLGH__
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: frame.h
|
||||
// Purpose: wxFrame class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __FRAMEH__
|
||||
#define __FRAMEH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "frame.h"
|
||||
#endif
|
||||
|
||||
#include "wx/window.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxFrameNameStr;
|
||||
|
||||
class WXDLLEXPORT wxMenuBar;
|
||||
class WXDLLEXPORT wxStatusBar;
|
||||
|
||||
class WXDLLEXPORT wxFrame: public wxWindow {
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||
|
||||
public:
|
||||
wxFrame(void);
|
||||
inline 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)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
~wxFrame(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,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
// The default thing is to set the focus for the first child window.
|
||||
// Override for your own behaviour.
|
||||
virtual void OldOnActivate(bool flag);
|
||||
|
||||
// Default behaviour is to display a help string for the menu item.
|
||||
virtual void OldOnMenuSelect(int id);
|
||||
|
||||
inline virtual void OldOnMenuCommand(int WXUNUSED(id)) {}; // Called on frame menu command
|
||||
void OldOnSize(int x, int y);
|
||||
#endif
|
||||
|
||||
virtual bool Destroy(void);
|
||||
void SetClientSize(const int width, const int height);
|
||||
void GetClientSize(int *width, int *height) const;
|
||||
|
||||
void GetSize(int *width, int *height) const ;
|
||||
void GetPosition(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 OnSize(wxSizeEvent& event);
|
||||
void OnMenuHighlight(wxMenuEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
bool Show(const bool show);
|
||||
|
||||
// Set menu bar
|
||||
void SetMenuBar(wxMenuBar *menu_bar);
|
||||
virtual wxMenuBar *GetMenuBar(void) const ;
|
||||
|
||||
// Set title
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle(void) const ;
|
||||
|
||||
void Centre(const int direction = wxBOTH);
|
||||
|
||||
// Call this to simulate a menu command
|
||||
virtual void Command(int id);
|
||||
virtual void ProcessCommand(int id);
|
||||
|
||||
// Set icon
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
|
||||
// Create status line
|
||||
virtual bool CreateStatusBar(const int number=1);
|
||||
inline wxStatusBar *GetStatusBar() const { return m_frameStatusBar; }
|
||||
|
||||
// Set status line text
|
||||
virtual void SetStatusText(const wxString& text, const int number = 0);
|
||||
|
||||
// Set status line widths
|
||||
virtual void SetStatusWidths(const int n, const int *widths_field);
|
||||
|
||||
// Hint to tell framework which status bar to use
|
||||
// TODO: should this go into a wxFrameworkSettings class perhaps?
|
||||
static void UseNativeStatusBar(bool useNative) { m_useNativeStatusBar = useNative; };
|
||||
static bool UsesNativeStatusBar(void) { return m_useNativeStatusBar; };
|
||||
|
||||
// Fit frame around subwindows
|
||||
virtual void Fit(void);
|
||||
|
||||
// Iconize
|
||||
virtual void Iconize(const bool iconize);
|
||||
|
||||
virtual bool IsIconized(void) const ;
|
||||
|
||||
// Compatibility
|
||||
inline bool Iconized(void) const { return IsIconized(); }
|
||||
|
||||
virtual void Maximize(const bool maximize);
|
||||
virtual bool LoadAccelerators(const wxString& table);
|
||||
|
||||
virtual void PositionStatusBar(void);
|
||||
virtual wxStatusBar *OnCreateStatusBar(const int number);
|
||||
|
||||
// Query app for menu item updates (called from OnIdle)
|
||||
void DoMenuUpdates(void);
|
||||
void DoMenuUpdates(wxMenu* menu);
|
||||
|
||||
WXHMENU GetWinMenu(void) const ;
|
||||
|
||||
// Responds to colour changes
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
// Handlers
|
||||
bool MSWOnPaint(void);
|
||||
WXHICON MSWOnQueryDragIcon(void);
|
||||
void MSWOnSize(const int x, const int y, const WXUINT flag);
|
||||
bool MSWOnCommand(const WXWORD id, const WXWORD cmd, const WXHWND control);
|
||||
bool MSWOnClose(void);
|
||||
void MSWOnMenuHighlight(const WXWORD item, const WXWORD flags, const WXHMENU sysmenu);
|
||||
bool MSWProcessMessage(WXMSG *msg);
|
||||
void MSWCreate(const int id, wxWindow *parent, const char *WXUNUSED(wclass), wxWindow *wx_win, const char *title,
|
||||
const int x, const int y, const int width, const int height, const long style);
|
||||
|
||||
protected:
|
||||
wxMenuBar * m_frameMenuBar;
|
||||
wxStatusBar * m_frameStatusBar;
|
||||
wxIcon m_icon;
|
||||
bool m_iconized;
|
||||
WXHICON m_defaultIcon;
|
||||
static bool m_useNativeStatusBar;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// __FRAMEH__
|
||||
@@ -0,0 +1,81 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: gauge.h
|
||||
// Purpose: wxGauge class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GAUGEH__
|
||||
#define __GAUGEH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "gauge.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr;
|
||||
|
||||
// Group box
|
||||
class WXDLLEXPORT wxGauge: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxGauge)
|
||||
public:
|
||||
inline wxGauge(void) { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = FALSE; }
|
||||
|
||||
inline wxGauge(wxWindow *parent, const wxWindowID id,
|
||||
const int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxGaugeNameStr)
|
||||
{
|
||||
Create(parent, id, range, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id,
|
||||
const int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxGaugeNameStr);
|
||||
|
||||
void SetShadowWidth(const int w);
|
||||
void SetBezelFace(const int w);
|
||||
void SetRange(const int r);
|
||||
void SetValue(const int pos);
|
||||
|
||||
int GetShadowWidth(void) const ;
|
||||
int GetBezelFace(void) const ;
|
||||
int GetRange(void) const ;
|
||||
int GetValue(void) const ;
|
||||
|
||||
void SetForegroundColour(const wxColour& col);
|
||||
void SetBackgroundColour(const wxColour& col);
|
||||
|
||||
// Backward compatibility
|
||||
#if WXWIN_COMPATIBILITY
|
||||
inline void SetButtonColour(const wxColour& col) { SetForegroundColour(col); }
|
||||
#endif
|
||||
|
||||
void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
// Are we a Win95 progress bar, or a normal gauge?
|
||||
inline bool GetProgressBar(void) const { return m_useProgressBar; }
|
||||
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
||||
|
||||
protected:
|
||||
int m_rangeMax;
|
||||
int m_gaugePos;
|
||||
bool m_useProgressBar;
|
||||
};
|
||||
|
||||
#endif
|
||||
// __GAUGEH__
|
||||
@@ -0,0 +1,67 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: gdiobj.h
|
||||
// Purpose: wxGDIObject class: base class for other GDI classes
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GDIOBJH__
|
||||
#define __GDIOBJH__
|
||||
|
||||
#include "wx/object.h"
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "gdiobj.h"
|
||||
#endif
|
||||
|
||||
// wxGDIRefData is the reference-counted data part of a GDI object.
|
||||
// It contains another counter, m_usageCount, which counts the number
|
||||
// of times this object has been used; e.g. in SetFont, the count
|
||||
// is incremented. This is different from reference counting,
|
||||
// where only the constructors, destructors and (un)clone operations
|
||||
// affect the reference count.
|
||||
// THIS IS NOW BEING REMOVED AS REDUNDANT AND ERROR-PRONE
|
||||
|
||||
class WXDLLEXPORT wxGDIRefData: public wxObjectRefData {
|
||||
public:
|
||||
inline wxGDIRefData(void)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
#define M_GDIDATA ((wxGDIRefData *)m_refData)
|
||||
|
||||
class WXDLLEXPORT wxGDIObject: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxGDIObject)
|
||||
public:
|
||||
inline wxGDIObject(void) { m_visible = FALSE; };
|
||||
inline ~wxGDIObject(void) {};
|
||||
|
||||
// Creates the resource
|
||||
virtual bool RealizeResource(void) { return FALSE; };
|
||||
|
||||
// Frees the resource
|
||||
virtual bool FreeResource(bool WXUNUSED(force) = FALSE) { return FALSE; };
|
||||
|
||||
virtual bool IsFree(void) { return FALSE; };
|
||||
|
||||
inline bool IsNull(void) const { return (m_refData == 0); }
|
||||
|
||||
// Returns handle.
|
||||
virtual WXHANDLE GetResourceHandle(void) { return 0; }
|
||||
|
||||
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__
|
||||
|
After Width: | Height: | Size: 326 B |
|
After Width: | Height: | Size: 326 B |
@@ -0,0 +1,54 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: helpwin.h
|
||||
// Purpose: Help system: WinHelp implementation
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __HELPWINH__
|
||||
#define __HELPWINH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "helpwin.h"
|
||||
#endif
|
||||
|
||||
#include "wx/wx.h"
|
||||
|
||||
#if USE_HELP
|
||||
|
||||
#include "wx/helpbase.h"
|
||||
|
||||
class WXDLLEXPORT wxWinHelpController: public wxHelpControllerBase
|
||||
{
|
||||
DECLARE_CLASS(wxWinHelpController)
|
||||
|
||||
public:
|
||||
wxWinHelpController(void);
|
||||
~wxWinHelpController(void);
|
||||
|
||||
// Must call this to set the filename and server name
|
||||
virtual bool Initialize(const wxString& file, int server = -1);
|
||||
|
||||
// If file is "", reloads file given in Initialize
|
||||
virtual bool LoadFile(const wxString& file = "");
|
||||
virtual bool DisplayContents(void);
|
||||
virtual bool DisplaySection(int sectionNo);
|
||||
virtual bool DisplayBlock(long blockNo);
|
||||
virtual bool KeywordSearch(const wxString& k);
|
||||
|
||||
virtual bool Quit(void);
|
||||
virtual void OnQuit(void);
|
||||
|
||||
inline wxString GetHelpFile(void) const { return m_helpFile; }
|
||||
|
||||
protected:
|
||||
wxString m_helpFile;
|
||||
};
|
||||
|
||||
#endif // USE_HELP
|
||||
#endif
|
||||
// __HELPWINH__
|
||||
@@ -0,0 +1,102 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: icon.h
|
||||
// Purpose: wxIcon class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __ICONH__
|
||||
#define __ICONH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "icon.h"
|
||||
#endif
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
class WXDLLEXPORT wxIconRefData: public wxBitmapRefData
|
||||
{
|
||||
friend class WXDLLEXPORT wxBitmap;
|
||||
friend class WXDLLEXPORT wxIcon;
|
||||
public:
|
||||
wxIconRefData(void);
|
||||
~wxIconRefData(void);
|
||||
|
||||
public:
|
||||
WXHICON m_hIcon;
|
||||
};
|
||||
|
||||
#define M_ICONDATA ((wxIconRefData *)m_refData)
|
||||
#define M_ICONHANDLERDATA ((wxIconRefData *)bitmap->GetRefData())
|
||||
|
||||
// Icon
|
||||
class WXDLLEXPORT wxIcon: public wxBitmap
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxIcon)
|
||||
|
||||
public:
|
||||
wxIcon(void);
|
||||
|
||||
// Copy constructors
|
||||
inline wxIcon(const wxIcon& icon) { Ref(icon); }
|
||||
inline wxIcon(const wxIcon* icon) { /* UnRef(); */ if (icon) Ref(*icon); }
|
||||
|
||||
wxIcon(const char bits[], const int width, const int height);
|
||||
wxIcon(const wxString& name, const long flags = wxBITMAP_TYPE_ICO_RESOURCE,
|
||||
int desiredWidth = -1, int desiredHeight = -1);
|
||||
~wxIcon(void);
|
||||
|
||||
bool LoadFile(const wxString& name, const long flags = wxBITMAP_TYPE_ICO_RESOURCE,
|
||||
int desiredWidth = -1, int desiredHeight = -1);
|
||||
|
||||
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; }
|
||||
|
||||
void SetHICON(WXHICON ico);
|
||||
inline WXHICON GetHICON(void) const { return (M_ICONDATA ? M_ICONDATA->m_hIcon : 0); }
|
||||
|
||||
virtual bool Ok(void) const { return (m_refData != NULL && M_ICONDATA->m_hIcon) ; }
|
||||
|
||||
bool FreeResource(bool force = FALSE);
|
||||
};
|
||||
|
||||
// TODO: Put these in separate, private header
|
||||
|
||||
class WXDLLEXPORT wxICOFileHandler: public wxBitmapHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxICOFileHandler)
|
||||
public:
|
||||
inline wxICOFileHandler(void)
|
||||
{
|
||||
m_name = "ICO icon file";
|
||||
m_extension = "ico";
|
||||
m_type = wxBITMAP_TYPE_ICO;
|
||||
};
|
||||
|
||||
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, const long flags,
|
||||
int desiredWidth = -1, int desiredHeight = -1);
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxICOResourceHandler: public wxBitmapHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxICOResourceHandler)
|
||||
public:
|
||||
inline wxICOResourceHandler(void)
|
||||
{
|
||||
m_name = "ICO resource";
|
||||
m_extension = "ico";
|
||||
m_type = wxBITMAP_TYPE_ICO_RESOURCE;
|
||||
};
|
||||
|
||||
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, const long flags,
|
||||
int desiredWidth = -1, int desiredHeight = -1);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
// __ICONH__
|
||||
@@ -0,0 +1,93 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: joystick.h
|
||||
// Purpose: wxJoystick class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __JOYSTICKH__
|
||||
#define __JOYSTICKH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "joystick.h"
|
||||
#endif
|
||||
|
||||
#include "wx/event.h"
|
||||
|
||||
class WXDLLEXPORT wxJoystick: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxJoystick)
|
||||
public:
|
||||
/*
|
||||
* Public interface
|
||||
*/
|
||||
|
||||
wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; };
|
||||
|
||||
// Attributes
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxPoint GetPosition(void) const;
|
||||
int GetZPosition(void) const;
|
||||
int GetButtonState(void) const;
|
||||
int GetPOVPosition(void) const;
|
||||
int GetPOVCTSPosition(void) const;
|
||||
int GetRudderPosition(void) const;
|
||||
int GetUPosition(void) const;
|
||||
int GetVPosition(void) const;
|
||||
int GetMovementThreshold(void) const;
|
||||
void SetMovementThreshold(int threshold) ;
|
||||
|
||||
// Capabilities
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool IsOk(void) const; // Checks that the joystick is functioning
|
||||
int GetNumberJoysticks(void) const ;
|
||||
int GetManufacturerId(void) const ;
|
||||
int GetProductId(void) const ;
|
||||
wxString GetProductName(void) const ;
|
||||
int GetXMin(void) const;
|
||||
int GetYMin(void) const;
|
||||
int GetZMin(void) const;
|
||||
int GetXMax(void) const;
|
||||
int GetYMax(void) const;
|
||||
int GetZMax(void) const;
|
||||
int GetNumberButtons(void) const;
|
||||
int GetNumberAxes(void) const;
|
||||
int GetMaxButtons(void) const;
|
||||
int GetMaxAxes(void) const;
|
||||
int GetPollingMin(void) const;
|
||||
int GetPollingMax(void) const;
|
||||
int GetRudderMin(void) const;
|
||||
int GetRudderMax(void) const;
|
||||
int GetUMin(void) const;
|
||||
int GetUMax(void) const;
|
||||
int GetVMin(void) const;
|
||||
int GetVMax(void) const;
|
||||
|
||||
bool HasRudder(void) const;
|
||||
bool HasZ(void) const;
|
||||
bool HasU(void) const;
|
||||
bool HasV(void) const;
|
||||
bool HasPOV(void) const;
|
||||
bool HasPOV4Dir(void) const;
|
||||
bool HasPOVCTS(void) const;
|
||||
|
||||
// Operations
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// pollingFreq = 0 means that movement events are sent when above the threshold.
|
||||
// If pollingFreq > 0, events are received every this many milliseconds.
|
||||
bool SetCapture(wxWindow* win, int pollingFreq = 0);
|
||||
bool ReleaseCapture(void);
|
||||
|
||||
protected:
|
||||
int m_joystick;
|
||||
};
|
||||
|
||||
#endif
|
||||
// __JOYSTICKH__
|
||||
@@ -0,0 +1,135 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: listbox.h
|
||||
// Purpose: wxListBox class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __LISTBOXH__
|
||||
#define __LISTBOXH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "listbox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxListBoxNameStr;
|
||||
WXDLLEXPORT_DATA(extern const char*) wxListBoxNameStr;
|
||||
|
||||
#if USE_OWNER_DRAWN
|
||||
class WXDLLEXPORT wxOwnerDrawn;
|
||||
|
||||
// define the array of list box items
|
||||
#include <wx/dynarray.h>
|
||||
WX_DEFINE_ARRAY(wxOwnerDrawn *, wxListBoxItemsArray);
|
||||
#endif
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||
|
||||
// List box item
|
||||
class WXDLLEXPORT wxListBox: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxListBox)
|
||||
public:
|
||||
|
||||
wxListBox(void);
|
||||
inline wxListBox(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 wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
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 wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
~wxListBox();
|
||||
|
||||
bool MSWCommand(const WXUINT param, const WXWORD id);
|
||||
|
||||
#if USE_OWNER_DRAWN
|
||||
bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
|
||||
bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||
|
||||
// plug-in for derived classes
|
||||
virtual wxOwnerDrawn *CreateItem(uint n);
|
||||
|
||||
// allows to get the item and use SetXXX functions to set it's appearance
|
||||
wxOwnerDrawn *GetItem(uint n) const { return m_aItems[n]; }
|
||||
#endif
|
||||
|
||||
virtual void Append(const wxString& item);
|
||||
virtual void Append(const wxString& item, char *clientData);
|
||||
virtual void Set(const int n, const wxString* choices, char **clientData = NULL);
|
||||
virtual int FindString(const wxString& s) const ;
|
||||
virtual void Clear(void);
|
||||
virtual void SetSelection(const int n, const bool select = TRUE);
|
||||
|
||||
virtual void Deselect(const int n);
|
||||
|
||||
// For single choice list item only
|
||||
virtual int GetSelection(void) const ;
|
||||
virtual void Delete(const int n);
|
||||
virtual char *GetClientData(const int n) const ;
|
||||
virtual void SetClientData(const int n, char *clientData);
|
||||
virtual void SetString(const int n, const wxString& s);
|
||||
|
||||
// For single or multiple choice list item
|
||||
virtual int GetSelections(int **listSelections) const ;
|
||||
virtual bool Selected(const int n) const ;
|
||||
virtual wxString GetString(const int n) const ;
|
||||
virtual void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
// Set the specified item at the first visible item
|
||||
// or scroll to max range.
|
||||
virtual void SetFirstItem(const int n) ;
|
||||
virtual void SetFirstItem(const wxString& s) ;
|
||||
|
||||
virtual void InsertItems(const int nItems, const wxString items[], const int pos);
|
||||
|
||||
virtual wxString GetStringSelection(void) const ;
|
||||
virtual bool SetStringSelection(const wxString& s, const bool flag = TRUE);
|
||||
virtual int Number(void) const ;
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
// Windows-specific code to set the horizontal extent of
|
||||
// the listbox, if necessary. If s is non-NULL, it's
|
||||
// used to calculate the horizontal extent.
|
||||
// Otherwise, all strings are used.
|
||||
virtual void SetHorizontalExtent(const wxString& s = wxEmptyString);
|
||||
|
||||
virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
virtual void SetupColours(void);
|
||||
|
||||
protected:
|
||||
int m_noItems;
|
||||
int m_selected;
|
||||
int *m_selections;
|
||||
|
||||
#if USE_OWNER_DRAWN
|
||||
// control items
|
||||
wxListBoxItemsArray m_aItems;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
// __LISTBOXH__
|
||||
|
After Width: | Height: | Size: 326 B |
@@ -0,0 +1,174 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: menu.h
|
||||
// Purpose: wxMenu, wxMenuBar classes
|
||||
// Author: Julian Smart
|
||||
// Modified by: Vadim Zeitlin (wxMenuItem is now in separate file)
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __MENUH__
|
||||
#define __MENUH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "menu.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/event.h"
|
||||
|
||||
class wxMenuItem;
|
||||
class wxMenuBar;
|
||||
class wxMenu;
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Menu
|
||||
// ----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxMenu: public wxEvtHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMenu)
|
||||
|
||||
public:
|
||||
// ctor & dtor
|
||||
wxMenu(const wxString& title = wxEmptyString, const wxFunction func = NULL);
|
||||
~wxMenu();
|
||||
|
||||
// construct menu
|
||||
// append items to the menu
|
||||
// separator line
|
||||
void AppendSeparator();
|
||||
// normal item
|
||||
void Append(int id, const wxString& Label, const wxString& helpString = wxEmptyString,
|
||||
bool checkable = FALSE);
|
||||
// a submenu
|
||||
void Append(int id, const wxString& Label, wxMenu *SubMenu,
|
||||
const wxString& helpString = wxEmptyString);
|
||||
// the most generic form (create wxMenuItem first and use it's functions)
|
||||
void Append(wxMenuItem *pItem);
|
||||
// insert a break in the menu
|
||||
void Break();
|
||||
// delete an item
|
||||
void Delete(int id); /* If it's a submenu, menu is not destroyed. VZ: why? */
|
||||
|
||||
// menu item control
|
||||
void Enable(int id, bool Flag);
|
||||
bool Enabled(int id) const;
|
||||
inline bool IsEnabled(int id) const { return Enabled(id); };
|
||||
void Check(int id, bool Flag);
|
||||
bool Checked(int id) const;
|
||||
inline bool IsChecked(int id) const { return IsChecked(id); };
|
||||
|
||||
// item properties
|
||||
// title
|
||||
void SetTitle(const wxString& label);
|
||||
const wxString& GetTitle() const;
|
||||
// label
|
||||
void SetLabel(int id, const wxString& label);
|
||||
wxString GetLabel(int id) const;
|
||||
// help string
|
||||
virtual void SetHelpString(const int id, const wxString& helpString);
|
||||
virtual wxString GetHelpString(const int id) const ;
|
||||
|
||||
// find item
|
||||
// Finds the item id matching the given string, NOT_FOUND if not found.
|
||||
virtual int FindItem(const wxString& itemString) const ;
|
||||
// Find wxMenuItem by ID, and item's menu too if itemMenu is !NULL.
|
||||
wxMenuItem *FindItemForId(const int itemId, wxMenu **itemMenu = NULL) const;
|
||||
|
||||
void ProcessCommand(wxCommandEvent& event);
|
||||
inline void Callback(const wxFunction func) { m_callback = func; }
|
||||
|
||||
virtual void SetParent(wxEvtHandler *parent) { m_parent = parent; }
|
||||
inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; }
|
||||
inline wxEvtHandler *GetEventHandler(void) { return m_eventHandler; }
|
||||
|
||||
// IMPLEMENTATION
|
||||
bool MSWCommand(const WXUINT param, const WXWORD id);
|
||||
|
||||
void SetInvokingWindow(wxWindow *pWin) { m_pInvokingWindow = pWin; }
|
||||
wxWindow *GetInvokingWindow() const { return m_pInvokingWindow; }
|
||||
|
||||
// semi-private accessors
|
||||
// get the window which contains this menu
|
||||
wxWindow *GetWindow() const;
|
||||
// get the menu handle
|
||||
WXHMENU GetHMenu() const;
|
||||
|
||||
private:
|
||||
bool m_doBreak ;
|
||||
|
||||
public:
|
||||
// This is used when m_hMenu is NULL because we don't want to
|
||||
// delete it in ~wxMenu (it's been added to a parent menu).
|
||||
// But we'll still need the handle for other purposes.
|
||||
// Might be better to have a flag saying whether it's deleteable or not.
|
||||
WXHMENU m_savehMenu ; // Used for Enable() on popup
|
||||
WXHMENU m_hMenu;
|
||||
wxFunction m_callback;
|
||||
|
||||
int m_noItems;
|
||||
wxString m_title;
|
||||
wxMenu * m_topLevelMenu;
|
||||
wxMenuBar * m_menuBar;
|
||||
wxList m_menuItems;
|
||||
wxEvtHandler * m_parent;
|
||||
wxEvtHandler * m_eventHandler;
|
||||
wxWindow *m_pInvokingWindow;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Menu Bar (a la Windows)
|
||||
// ----------------------------------------------------------------------------
|
||||
class wxFrame;
|
||||
class WXDLLEXPORT wxMenuBar: public wxEvtHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMenuBar)
|
||||
|
||||
wxMenuBar(void);
|
||||
wxMenuBar(const int n, wxMenu *menus[], const wxString titles[]);
|
||||
~wxMenuBar(void);
|
||||
|
||||
void Append(wxMenu *menu, const wxString& title);
|
||||
// Must only be used AFTER menu has been attached to frame,
|
||||
// otherwise use individual menus to enable/disable items
|
||||
void Enable(const int Id, const bool Flag);
|
||||
bool Enabled(const int Id) const ;
|
||||
inline bool IsEnabled(const int Id) const { return Enabled(Id); };
|
||||
void EnableTop(const int pos, const bool Flag);
|
||||
void Check(const int id, const bool Flag);
|
||||
bool Checked(const int id) const ;
|
||||
inline bool IsChecked(const int Id) const { return Checked(Id); };
|
||||
void SetLabel(const int id, const wxString& label) ;
|
||||
wxString GetLabel(const int id) const ;
|
||||
void SetLabelTop(const int pos, const wxString& label) ;
|
||||
wxString GetLabelTop(const int pos) const ;
|
||||
virtual void Delete(wxMenu *menu, const int index = 0); /* Menu not destroyed */
|
||||
virtual bool OnAppend(wxMenu *menu, const char *title);
|
||||
virtual bool OnDelete(wxMenu *menu, const int index);
|
||||
|
||||
virtual void SetHelpString(const int Id, const wxString& helpString);
|
||||
virtual wxString GetHelpString(const int Id) const ;
|
||||
|
||||
virtual int FindMenuItem(const wxString& menuString, const wxString& itemString) const ;
|
||||
|
||||
// Find wxMenuItem for item ID, and return item's
|
||||
// menu too if itemMenu is non-NULL.
|
||||
wxMenuItem *FindItemForId(const int itemId, wxMenu **menuForItem = NULL) const ;
|
||||
|
||||
inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; }
|
||||
inline wxEvtHandler *GetEventHandler(void) { return m_eventHandler; }
|
||||
|
||||
public:
|
||||
wxEvtHandler * m_eventHandler;
|
||||
int m_menuCount;
|
||||
wxMenu ** m_menus;
|
||||
wxString * m_titles;
|
||||
wxFrame * m_menuBarFrame;
|
||||
WXHMENU m_hMenu;
|
||||
};
|
||||
|
||||
#endif // __MENUH__
|
||||
@@ -0,0 +1,104 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: metafile.h
|
||||
// Purpose: wxMetaFile, wxMetaFileDC classes
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __METAFIILEH__
|
||||
#define __METAFIILEH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "metafile.h"
|
||||
#endif
|
||||
|
||||
#include "wx/setup.h"
|
||||
|
||||
#if USE_METAFILE
|
||||
#include "wx/dc.h"
|
||||
|
||||
/*
|
||||
* Metafile and metafile device context classes - work in Windows 3.1 only
|
||||
*
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxDC;
|
||||
class WXDLLEXPORT wxMetaFile: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMetaFile)
|
||||
public:
|
||||
wxMetaFile(const wxString& file = "");
|
||||
~wxMetaFile(void);
|
||||
|
||||
// After this is called, the metafile cannot be used for anything
|
||||
// since it is now owned by the clipboard.
|
||||
virtual bool SetClipboard(int width = 0, int height = 0);
|
||||
|
||||
virtual bool Play(wxDC *dc);
|
||||
inline bool Ok(void) { return m_metaFile != 0; };
|
||||
|
||||
// Implementation
|
||||
inline WXHANDLE GetHMETAFILE(void) { return m_metaFile; }
|
||||
inline void SetHMETAFILE(WXHANDLE mf) { m_metaFile = mf; }
|
||||
inline int GetWindowsMappingMode(void) { return m_windowsMappingMode; }
|
||||
inline void SetWindowsMappingMode(int mm) { m_windowsMappingMode = mm; }
|
||||
|
||||
protected:
|
||||
WXHANDLE m_metaFile;
|
||||
int m_windowsMappingMode;
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxMetaFileDC: public wxDC
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMetaFileDC)
|
||||
|
||||
public:
|
||||
// Don't supply origin and extent
|
||||
// Supply them to wxMakeMetaFilePlaceable instead.
|
||||
wxMetaFileDC(const wxString& file = "");
|
||||
|
||||
// Supply origin and extent (recommended).
|
||||
// Then don't need to supply them to wxMakeMetaFilePlaceable.
|
||||
wxMetaFileDC(const wxString& file, int xext, int yext, int xorg, int yorg);
|
||||
|
||||
~wxMetaFileDC(void);
|
||||
|
||||
// Should be called at end of drawing
|
||||
virtual wxMetaFile *Close(void);
|
||||
virtual void SetMapMode(int mode);
|
||||
virtual void GetTextExtent(const wxString& string, float *x, float *y,
|
||||
float *descent = NULL, float *externalLeading = NULL,
|
||||
wxFont *theFont = NULL, bool use16bit = FALSE);
|
||||
|
||||
// Implementation
|
||||
inline wxMetaFile *GetMetaFile(void) { return m_metaFile; }
|
||||
inline void SetMetaFile(wxMetaFile *mf) { m_metaFile = mf; }
|
||||
inline int GetWindowsMappingMode(void) { return m_windowsMappingMode; }
|
||||
inline void SetWindowsMappingMode(int mm) { m_windowsMappingMode = mm; }
|
||||
|
||||
protected:
|
||||
int m_windowsMappingMode;
|
||||
wxMetaFile *m_metaFile;
|
||||
};
|
||||
|
||||
/*
|
||||
* Pass filename of existing non-placeable metafile, and bounding box.
|
||||
* Adds a placeable metafile header, sets the mapping mode to anisotropic,
|
||||
* and sets the window origin and extent to mimic the MM_TEXT mapping mode.
|
||||
*
|
||||
*/
|
||||
|
||||
// No origin or extent
|
||||
bool WXDLLEXPORT wxMakeMetaFilePlaceable(const wxString& filename, float scale = 1.0);
|
||||
|
||||
// Optional origin and extent
|
||||
bool WXDLLEXPORT wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, int y2, float scale = 1.0, bool useOriginAndExtent = TRUE);
|
||||
|
||||
#endif // USE_METAFILE
|
||||
#endif
|
||||
// __METAFIILEH__
|
||||
@@ -0,0 +1,46 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: minifram.h
|
||||
// Purpose: wxMiniFrame class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __MINIFRAMH__
|
||||
#define __MINIFRAMH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "minifram.h"
|
||||
#endif
|
||||
|
||||
#include "wx/frame.h"
|
||||
|
||||
class WXDLLEXPORT wxMiniFrame: public wxFrame {
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMiniFrame)
|
||||
|
||||
public:
|
||||
inline wxMiniFrame(void) {}
|
||||
inline wxMiniFrame(wxWindow *parent,
|
||||
const wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = wxDEFAULT_FRAME|wxTINY_CAPTION_HORIZ,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
~wxMiniFrame(void);
|
||||
|
||||
long MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif
|
||||
// __MINIFRAMH__
|
||||
@@ -0,0 +1,49 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msgdlg.h
|
||||
// Purpose: wxMessageDialog class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __MSGBOXDLGH__
|
||||
#define __MSGBOXDLGH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "msgdlg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/setup.h"
|
||||
#include "wx/dialog.h"
|
||||
|
||||
/*
|
||||
* Message box dialog
|
||||
*/
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxMessageBoxCaptionStr;
|
||||
|
||||
class WXDLLEXPORT wxMessageDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMessageDialog)
|
||||
protected:
|
||||
wxString m_caption;
|
||||
wxString m_message;
|
||||
long m_dialogStyle;
|
||||
wxWindow * m_parent;
|
||||
public:
|
||||
wxMessageDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxMessageBoxCaptionStr,
|
||||
long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
int ShowModal(void);
|
||||
};
|
||||
|
||||
|
||||
int WXDLLEXPORT wxMessageBox(const wxString& message, const wxString& caption = wxMessageBoxCaptionStr,
|
||||
const long style = wxOK|wxCENTRE,
|
||||
wxWindow *parent = NULL, const int x = -1, const int y = -1);
|
||||
|
||||
#endif
|
||||
// __MSGBOXDLGH__
|
||||
|
After Width: | Height: | Size: 326 B |
@@ -0,0 +1,66 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: palette.h
|
||||
// Purpose: wxPalette class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __PALETTEH__
|
||||
#define __PALETTEH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "palette.h"
|
||||
#endif
|
||||
|
||||
#include "wx/gdiobj.h"
|
||||
|
||||
class WXDLLEXPORT wxPalette;
|
||||
|
||||
class WXDLLEXPORT wxPaletteRefData: public wxGDIRefData
|
||||
{
|
||||
friend class WXDLLEXPORT wxPalette;
|
||||
public:
|
||||
wxPaletteRefData(void);
|
||||
~wxPaletteRefData(void);
|
||||
protected:
|
||||
WXHPALETTE m_hPalette;
|
||||
};
|
||||
|
||||
#define M_PALETTEDATA ((wxPaletteRefData *)m_refData)
|
||||
|
||||
class WXDLLEXPORT wxPalette: public wxGDIObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPalette)
|
||||
|
||||
public:
|
||||
wxPalette(void);
|
||||
inline wxPalette(const wxPalette& palette) { Ref(palette); }
|
||||
inline wxPalette(const wxPalette* palette) { /* UnRef(); */ if (palette) Ref(*palette); }
|
||||
|
||||
wxPalette(const int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||
~wxPalette(void);
|
||||
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;
|
||||
|
||||
virtual bool Ok(void) const { return (m_refData != NULL) ; }
|
||||
|
||||
inline wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; }
|
||||
inline bool operator == (const wxPalette& palette) { return m_refData == palette.m_refData; }
|
||||
inline bool operator != (const wxPalette& palette) { return m_refData != palette.m_refData; }
|
||||
|
||||
virtual bool FreeResource(bool force = FALSE);
|
||||
|
||||
inline WXHPALETTE GetHPALETTE(void) const { return (M_PALETTEDATA ? M_PALETTEDATA->m_hPalette : 0); }
|
||||
void SetHPALETTE(WXHPALETTE pal);
|
||||
};
|
||||
|
||||
#define wxColorMap wxPalette
|
||||
#define wxColourMap wxPalette
|
||||
|
||||
#endif
|
||||
// __PALETTEH__
|
||||
|
After Width: | Height: | Size: 326 B |
@@ -0,0 +1,98 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: pen.h
|
||||
// Purpose: wxPen class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __PENH__
|
||||
#define __PENH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "pen.h"
|
||||
#endif
|
||||
|
||||
#include "wx/gdiobj.h"
|
||||
|
||||
typedef WXDWORD wxDash ;
|
||||
|
||||
class WXDLLEXPORT wxPen;
|
||||
|
||||
class WXDLLEXPORT wxPenRefData: public wxGDIRefData
|
||||
{
|
||||
friend class WXDLLEXPORT wxPen;
|
||||
public:
|
||||
wxPenRefData(void);
|
||||
~wxPenRefData(void);
|
||||
|
||||
protected:
|
||||
int m_width;
|
||||
int m_style;
|
||||
int m_join ;
|
||||
int m_cap ;
|
||||
wxBitmap m_stipple ;
|
||||
int m_nbDash ;
|
||||
wxDash * m_dash ;
|
||||
wxColour m_colour;
|
||||
WXHPEN m_hPen;
|
||||
};
|
||||
|
||||
#define M_PENDATA ((wxPenRefData *)m_refData)
|
||||
|
||||
// Pen
|
||||
class WXDLLEXPORT wxPen: public wxGDIObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPen)
|
||||
public:
|
||||
wxPen(void);
|
||||
wxPen(const wxColour& col, const int width, const int style);
|
||||
wxPen(const wxString& col, const int width, const int style);
|
||||
wxPen(const wxBitmap& stipple, const int width);
|
||||
inline wxPen(const wxPen& pen) { Ref(pen); }
|
||||
inline wxPen(const wxPen* pen) { /* UnRef(); */ if (pen) Ref(*pen); }
|
||||
~wxPen(void);
|
||||
|
||||
inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
|
||||
inline bool operator == (const wxPen& pen) { return m_refData == pen.m_refData; }
|
||||
inline bool operator != (const wxPen& pen) { return m_refData != pen.m_refData; }
|
||||
|
||||
virtual bool Ok(void) const { return (m_refData != NULL) ; }
|
||||
|
||||
// Override in order to recreate the pen
|
||||
void SetColour(const wxColour& col) ;
|
||||
void SetColour(const wxString& col) ;
|
||||
void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ;
|
||||
|
||||
void SetWidth(const int width) ;
|
||||
void SetStyle(const int style) ;
|
||||
void SetStipple(const wxBitmap& stipple) ;
|
||||
void SetDashes(const int nb_dashes, const wxDash *dash) ;
|
||||
void SetJoin(const int join) ;
|
||||
void SetCap(const int cap) ;
|
||||
|
||||
inline wxColour& GetColour(void) const { return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour); };
|
||||
inline int GetWidth(void) const { return (M_PENDATA ? M_PENDATA->m_width : 0); };
|
||||
inline int GetStyle(void) const { return (M_PENDATA ? M_PENDATA->m_style : 0); };
|
||||
inline int GetJoin(void) const { return (M_PENDATA ? M_PENDATA->m_join : 0); };
|
||||
inline int GetCap(void) const { return (M_PENDATA ? M_PENDATA->m_cap : 0); };
|
||||
inline int GetDashes(wxDash **ptr) const {
|
||||
*ptr = (M_PENDATA ? M_PENDATA->m_dash : NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0);
|
||||
}
|
||||
|
||||
inline wxBitmap *GetStipple(void) const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : NULL); };
|
||||
|
||||
// Internal
|
||||
bool RealizeResource(void);
|
||||
bool FreeResource(bool force = FALSE);
|
||||
WXHANDLE GetResourceHandle(void) ;
|
||||
bool IsFree(void);
|
||||
};
|
||||
|
||||
int wx2msPenStyle(int wx_style);
|
||||
|
||||
#endif
|
||||
// __PENH__
|
||||
|
After Width: | Height: | Size: 326 B |
@@ -0,0 +1,27 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: pnghand.h
|
||||
// Purpose: PNG bitmap handler
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Microsoft, Julian Smart
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class WXDLLEXPORT wxPNGFileHandler: public wxBitmapHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPNGFileHandler)
|
||||
public:
|
||||
inline wxPNGFileHandler(void)
|
||||
{
|
||||
m_name = "PNG bitmap file";
|
||||
m_extension = "bmp";
|
||||
m_type = wxBITMAP_TYPE_PNG;
|
||||
};
|
||||
|
||||
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, const long flags,
|
||||
int desiredWidth, int desiredHeight);
|
||||
virtual bool SaveFile(wxBitmap *bitmap, const wxString& name, const int type, const wxPalette *palette = NULL);
|
||||
};
|
||||
|
||||
|
After Width: | Height: | Size: 326 B |
|
After Width: | Height: | Size: 326 B |
@@ -0,0 +1,71 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: printdlg.h
|
||||
// Purpose: wxPrintDialog, wxPageSetupDialog classes
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __PRINTDLGH__
|
||||
#define __PRINTDLGH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "printdlg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/cmndata.h"
|
||||
|
||||
/*
|
||||
* wxPrinterDialog
|
||||
* The common dialog for printing.
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxDC;
|
||||
class WXDLLEXPORT wxPrintDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPrintDialog)
|
||||
|
||||
private:
|
||||
wxPrintData printData;
|
||||
wxDC *printerDC;
|
||||
bool destroyDC;
|
||||
char *deviceName;
|
||||
char *driverName;
|
||||
char *portName;
|
||||
wxWindow *dialogParent;
|
||||
public:
|
||||
wxPrintDialog(void);
|
||||
wxPrintDialog(wxWindow *parent, wxPrintData* data = NULL);
|
||||
~wxPrintDialog(void);
|
||||
|
||||
bool Create(wxWindow *parent, wxPrintData* data = NULL);
|
||||
virtual int ShowModal(void);
|
||||
|
||||
inline wxPrintData& GetPrintData(void) { return printData; }
|
||||
virtual wxDC *GetPrintDC(void);
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxPageSetupDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPageSetupDialog)
|
||||
|
||||
private:
|
||||
wxPageSetupData m_pageSetupData;
|
||||
wxWindow* m_dialogParent;
|
||||
public:
|
||||
wxPageSetupDialog(void);
|
||||
wxPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL);
|
||||
~wxPageSetupDialog(void);
|
||||
|
||||
bool Create(wxWindow *parent, wxPageSetupData *data = NULL);
|
||||
virtual int ShowModal(void);
|
||||
|
||||
inline wxPageSetupData& GetPageSetupData(void) { return m_pageSetupData; }
|
||||
};
|
||||
|
||||
#endif
|
||||
// __PRINTDLGH__
|
||||
@@ -0,0 +1,58 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: printwin.h
|
||||
// Purpose: wxWindowsPrinter, wxWindowsPrintPreview classes
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __PRINTWINH__
|
||||
#define __PRINTWINH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "printwin.h"
|
||||
#endif
|
||||
|
||||
#include "wx/prntbase.h"
|
||||
|
||||
/*
|
||||
* Represents the printer: manages printing a wxPrintout object
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxWindowsPrinter: public wxPrinterBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxWindowsPrinter)
|
||||
|
||||
private:
|
||||
WXFARPROC lpAbortProc;
|
||||
public:
|
||||
wxWindowsPrinter(wxPrintData *data = NULL);
|
||||
~wxWindowsPrinter(void);
|
||||
|
||||
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE);
|
||||
virtual bool PrintDialog(wxWindow *parent);
|
||||
virtual bool Setup(wxWindow *parent);
|
||||
};
|
||||
|
||||
/*
|
||||
* wxPrintPreview
|
||||
* Programmer creates an object of this class to preview a wxPrintout.
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxWindowsPrintPreview: public wxPrintPreviewBase
|
||||
{
|
||||
DECLARE_CLASS(wxWindowsPrintPreview)
|
||||
|
||||
public:
|
||||
wxWindowsPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintData *data = NULL);
|
||||
~wxWindowsPrintPreview(void);
|
||||
|
||||
virtual bool Print(bool interactive);
|
||||
virtual void DetermineScaling(void);
|
||||
};
|
||||
|
||||
#endif
|
||||
// __PRINTWINH__
|
||||
@@ -0,0 +1,146 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: private.h
|
||||
// Purpose: Private declarations
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __PRIVATEH__
|
||||
#define __PRIVATEH__
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define VIEWPORT_EXTENT 1000
|
||||
|
||||
class WXDLLEXPORT wxFont ;
|
||||
|
||||
void WXDLLEXPORT wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font);
|
||||
void WXDLLEXPORT wxSliderEvent(WXHWND control, WXWORD wParam, WXWORD pos);
|
||||
wxWindow* WXDLLEXPORT wxFindWinFromHandle(WXHWND hWnd);
|
||||
void WXDLLEXPORT wxScrollBarEvent(WXHWND hbar, WXWORD wParam, WXWORD pos);
|
||||
|
||||
WXDLLEXPORT_DATA(extern HICON) wxSTD_FRAME_ICON;
|
||||
WXDLLEXPORT_DATA(extern HICON) wxSTD_MDIPARENTFRAME_ICON;
|
||||
WXDLLEXPORT_DATA(extern HICON) wxSTD_MDICHILDFRAME_ICON;
|
||||
WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_FRAME_ICON;
|
||||
WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDIPARENTFRAME_ICON;
|
||||
WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDICHILDFRAME_ICON;
|
||||
WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT;
|
||||
|
||||
extern HINSTANCE WXDLLEXPORT wxGetInstance();
|
||||
void WXDLLEXPORT wxFillLogFont(LOGFONT *logFont, wxFont *font);
|
||||
wxFont WXDLLEXPORT wxCreateFontFromLogFont(LOGFONT *logFont); // , bool createNew = TRUE);
|
||||
|
||||
#ifdef __GNUWIN32__
|
||||
#define CASTWNDPROC (long unsigned)
|
||||
#else
|
||||
#define CASTWNDPROC
|
||||
#endif
|
||||
|
||||
#if !defined(APIENTRY) // NT defines APIENTRY, 3.x not
|
||||
#define APIENTRY FAR PASCAL
|
||||
#endif
|
||||
|
||||
#ifdef __WIN32__
|
||||
#define _EXPORT /**/
|
||||
#else
|
||||
#define _EXPORT _export
|
||||
typedef signed short int SHORT ;
|
||||
#endif
|
||||
|
||||
#if !defined(__WIN32__) // 3.x uses FARPROC for dialogs
|
||||
#define DLGPROC FARPROC
|
||||
#endif
|
||||
|
||||
#if USE_PENWIN
|
||||
void WXDLLEXPORT wxRegisterPenWin(void);
|
||||
void WXDLLEXPORT wxCleanUpPenWin(void);
|
||||
void WXDLLEXPORT wxEnablePenAppHooks (bool hook);
|
||||
#endif
|
||||
|
||||
#if USE_ITSY_BITSY
|
||||
#define IBS_HORZCAPTION 0x4000L
|
||||
#define IBS_VERTCAPTION 0x8000L
|
||||
|
||||
UINT WINAPI ibGetCaptionSize( HWND hWnd ) ;
|
||||
UINT WINAPI ibSetCaptionSize( HWND hWnd, UINT nSize ) ;
|
||||
LRESULT WINAPI ibDefWindowProc( HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam ) ;
|
||||
VOID WINAPI ibAdjustWindowRect( HWND hWnd, LPRECT lprc ) ;
|
||||
#endif
|
||||
|
||||
/* When implementing a new item, be sure to:
|
||||
*
|
||||
* - add the item to the parent panel
|
||||
* - set window_parent to the parent
|
||||
* - NULL any extra child window pointers not created for this item
|
||||
* (e.g. label control that wasn't needed)
|
||||
* - delete any extra child windows in the destructor (e.g. label control)
|
||||
* - implement GetSize and SetSize
|
||||
* - to find panel position if coordinates are (-1, -1), use GetPosition
|
||||
* - call AdvanceCursor after creation, for panel layout mechanism.
|
||||
*
|
||||
*/
|
||||
|
||||
#if CTL3D
|
||||
#include <wx/msw/ctl3d/ctl3d.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Decide what window classes we're going to use
|
||||
* for this combination of CTl3D/FAFA settings
|
||||
*/
|
||||
|
||||
#define STATIC_CLASS "STATIC"
|
||||
#define STATIC_FLAGS (SS_LEFT|WS_CHILD|WS_VISIBLE)
|
||||
#define CHECK_CLASS "BUTTON"
|
||||
#define CHECK_FLAGS (BS_AUTOCHECKBOX|WS_TABSTOP|WS_CHILD)
|
||||
#define CHECK_IS_FAFA FALSE
|
||||
#define RADIO_CLASS "BUTTON"
|
||||
#define RADIO_FLAGS (BS_AUTORADIOBUTTON|WS_CHILD|WS_VISIBLE)
|
||||
#define RADIO_SIZE 20
|
||||
#define RADIO_IS_FAFA FALSE
|
||||
#define PURE_WINDOWS
|
||||
#define GROUP_CLASS "BUTTON"
|
||||
#define GROUP_FLAGS (BS_GROUPBOX|WS_CHILD|WS_VISIBLE)
|
||||
|
||||
/*
|
||||
#define BITCHECK_FLAGS (FB_BITMAP|FC_BUTTONDRAW|FC_DEFAULT|WS_VISIBLE)
|
||||
#define BITRADIO_FLAGS (FC_BUTTONDRAW|FB_BITMAP|FC_RADIO|WS_CHILD|WS_VISIBLE)
|
||||
*/
|
||||
|
||||
#define MEANING_CHARACTER '0'
|
||||
#define DEFAULT_ITEM_WIDTH 200
|
||||
#define DEFAULT_ITEM_HEIGHT 80
|
||||
#define EDIT_CONTROL_FACTOR (15.0/10.0)
|
||||
// Scale font to get edit control height
|
||||
|
||||
// Generic subclass proc, for panel item moving/sizing and intercept
|
||||
// EDIT control VK_RETURN messages
|
||||
extern LONG APIENTRY _EXPORT
|
||||
wxSubclassedGenericControlProc(WXHWND hWnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
// Find maximum size of window/rectangle
|
||||
extern void WXDLLEXPORT wxFindMaxSize(WXHWND hwnd, RECT *rect);
|
||||
|
||||
// List of scrollbar controls
|
||||
WXDLLEXPORT_DATA(extern wxList) wxScrollBarList;
|
||||
// The MakeProcInstance version of the function wxSubclassedGenericControlProc
|
||||
WXDLLEXPORT_DATA(extern FARPROC) wxGenericControlSubClassProc;
|
||||
WXDLLEXPORT_DATA(extern char*) wxBuffer;
|
||||
WXDLLEXPORT_DATA(extern HINSTANCE) wxhInstance;
|
||||
|
||||
wxWindow* WXDLLEXPORT wxFindControlFromHandle(WXHWND hWnd);
|
||||
void WXDLLEXPORT wxAddControlHandle(WXHWND hWnd, wxWindow *item);
|
||||
|
||||
#if !defined(__WIN32__) && !defined(WS_EX_CLIENTEDGE)
|
||||
#define WS_EX_CLIENTEDGE 0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// __PRIVATEH__
|
||||
|
After Width: | Height: | Size: 326 B |
@@ -0,0 +1,137 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: radiobox.h
|
||||
// Purpose: wxRadioBox class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __RADIOBOXH__
|
||||
#define __RADIOBOXH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "radiobox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr;
|
||||
|
||||
// List box item
|
||||
class WXDLLEXPORT wxBitmap ;
|
||||
|
||||
class WXDLLEXPORT wxRadioBox: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
||||
public:
|
||||
wxRadioBox(void);
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
wxRadioBox(wxWindow *parent, wxFunction func, const char *title,
|
||||
int x = -1, int y = -1, int width = -1, int height = -1,
|
||||
int n = 0, char **choices = NULL,
|
||||
int majorDim = 0, long style = wxRA_HORIZONTAL, const char *name = wxRadioBoxNameStr);
|
||||
|
||||
/*
|
||||
inline wxRadioBox(wxWindow *parent, wxFunction func, const char *title,
|
||||
int x, int y, int width, int height,
|
||||
int n, wxBitmap **choices,
|
||||
int majorDim = 0, long style = wxRA_HORIZONTAL, const char *name = wxRadioBoxNameStr)
|
||||
{
|
||||
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), n, (const wxBitmap **)choices, majorDim, style,
|
||||
wxDefaultValidator, name);
|
||||
Callback(func);
|
||||
}
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
inline 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 wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
|
||||
}
|
||||
|
||||
/*
|
||||
wxRadioBox(wxWindow *parent, const wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
const int n = 0, const wxBitmap *choices[] = NULL,
|
||||
const int majorDim = 0, const long style = wxRA_HORIZONTAL,
|
||||
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
|
||||
}
|
||||
*/
|
||||
|
||||
~wxRadioBox(void);
|
||||
|
||||
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 wxValidator& val = wxDefaultValidator, 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 wxBitmap *choices[] = NULL,
|
||||
const int majorDim = 0, const long style = wxRA_HORIZONTAL,
|
||||
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
|
||||
*/
|
||||
|
||||
virtual bool MSWCommand(const WXUINT param, const WXWORD id);
|
||||
virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
int FindString(const wxString& s) const;
|
||||
void SetSelection(const int N);
|
||||
int GetSelection(void) const;
|
||||
wxString GetString(const int N) const;
|
||||
void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
|
||||
void GetSize(int *x, int *y) const;
|
||||
void GetPosition(int *x, int *y) 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 SetFocus(void);
|
||||
void Enable(const bool enable);
|
||||
void Enable(const int item, const bool enable);
|
||||
void Show(const int item, const bool show) ;
|
||||
inline void SetLabelFont(const wxFont& WXUNUSED(font)) {};
|
||||
inline void SetButtonFont(const wxFont& font) { SetFont(font); }
|
||||
|
||||
virtual wxString GetStringSelection(void) const;
|
||||
virtual bool SetStringSelection(const wxString& s);
|
||||
inline virtual int Number(void) const { return m_noItems; } ;
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
inline int GetNumberOfRowsOrCols(void) const { return m_noRowsOrCols; }
|
||||
inline void SetNumberOfRowsOrCols(const int n) { m_noRowsOrCols = n; }
|
||||
|
||||
// Implementation
|
||||
inline WXHWND *GetRadioButtons(void) const { return m_radioButtons; }
|
||||
bool ContainsHWND(WXHWND hWnd) const ;
|
||||
|
||||
protected:
|
||||
WXHWND * m_radioButtons;
|
||||
int m_majorDim ;
|
||||
int * m_radioWidth ; // for bitmaps
|
||||
int * m_radioHeight ;
|
||||
|
||||
int m_noItems;
|
||||
int m_noRowsOrCols;
|
||||
int m_selectedButton;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
// __RADIOBOXH__
|
||||
@@ -0,0 +1,92 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: radiobut.h
|
||||
// Purpose: wxRadioButton class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __RADIOBUTH__
|
||||
#define __RADIOBUTH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "radiobut.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxRadioButtonNameStr;
|
||||
|
||||
class WXDLLEXPORT wxRadioButton: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxRadioButton)
|
||||
protected:
|
||||
public:
|
||||
inline wxRadioButton(void) {}
|
||||
inline wxRadioButton(wxWindow *parent, const wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, const long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxRadioButtonNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, const long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxRadioButtonNameStr);
|
||||
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual void SetValue(const bool val);
|
||||
virtual bool GetValue(void) const ;
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
};
|
||||
|
||||
// Not implemented
|
||||
#if 0
|
||||
class WXDLLEXPORT wxBitmap ;
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr;
|
||||
|
||||
class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton)
|
||||
protected:
|
||||
wxBitmap *theButtonBitmap;
|
||||
public:
|
||||
inline wxBitmapRadioButton(void) { theButtonBitmap = NULL; }
|
||||
inline wxBitmapRadioButton(wxWindow *parent, const wxWindowID id,
|
||||
const wxBitmap *label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, const long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxBitmapRadioButtonNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id,
|
||||
const wxBitmap *label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, const long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxBitmapRadioButtonNameStr);
|
||||
|
||||
virtual void SetLabel(const wxBitmap *label);
|
||||
virtual void SetValue(const bool val) ;
|
||||
virtual bool GetValue(void) const ;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// __RADIOBUTH__
|
||||
@@ -0,0 +1,136 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: region.h
|
||||
// Purpose: wxRegion class
|
||||
// Author: Markus Holzem, Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __REGIONH__
|
||||
#define __REGIONH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "region.h"
|
||||
#endif
|
||||
|
||||
#include "wx/list.h"
|
||||
#include "wx/gdiobj.h"
|
||||
|
||||
class WXDLLEXPORT wxRect;
|
||||
class WXDLLEXPORT wxPoint;
|
||||
|
||||
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.
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxRegion : public wxGDIObject {
|
||||
DECLARE_DYNAMIC_CLASS(wxRegion);
|
||||
friend class WXDLLEXPORT wxRegionIterator;
|
||||
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);
|
||||
|
||||
//# Copying
|
||||
inline wxRegion(const wxRegion& r)
|
||||
{ Ref(r); }
|
||||
inline wxRegion& operator = (const wxRegion& r)
|
||||
{ Ref(r); return (*this); }
|
||||
|
||||
//# Modify region
|
||||
// Clear current region
|
||||
void Clear(void);
|
||||
|
||||
// Union rectangle or region with this.
|
||||
inline bool Union(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_OR); }
|
||||
inline bool Union(const wxRect& rect) { return Combine(rect, wxRGN_OR); }
|
||||
inline bool Union(const wxRegion& region) { return Combine(region, wxRGN_OR); }
|
||||
|
||||
// Intersect rectangle or region with this.
|
||||
inline bool Intersect(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_AND); }
|
||||
inline bool Intersect(const wxRect& rect) { return Combine(rect, wxRGN_AND); }
|
||||
inline bool Intersect(const wxRegion& region) { return Combine(region, wxRGN_AND); }
|
||||
|
||||
// Subtract rectangle or region from this:
|
||||
// Combines the parts of 'this' that are not part of the second region.
|
||||
inline bool Subtract(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_DIFF); }
|
||||
inline bool Subtract(const wxRect& rect) { return Combine(rect, wxRGN_DIFF); }
|
||||
inline bool Subtract(const wxRegion& region) { return Combine(region, wxRGN_DIFF); }
|
||||
|
||||
// XOR: the union of two combined regions except for any overlapping areas.
|
||||
inline bool Xor(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_XOR); }
|
||||
inline bool Xor(const wxRect& rect) { return Combine(rect, wxRGN_XOR); }
|
||||
inline bool Xor(const wxRegion& region) { return Combine(region, wxRGN_XOR); }
|
||||
|
||||
//# Information on region
|
||||
// Outer bounds of region
|
||||
void GetBox(long& x, long& y, long&w, long &h) const;
|
||||
wxRect GetBox(void) const ;
|
||||
|
||||
// Is region empty?
|
||||
bool Empty(void) const;
|
||||
inline bool IsEmpty(void) const { return Empty(); }
|
||||
|
||||
//# Tests
|
||||
// Does the region contain the point (x,y)?
|
||||
wxRegionContain Contains(long x, long y) const;
|
||||
// Does the region contain the point pt?
|
||||
wxRegionContain Contains(const wxPoint& pt) const;
|
||||
// Does the region contain the rectangle (x, y, w, h)?
|
||||
wxRegionContain Contains(long x, long y, long w, long h) const;
|
||||
// Does the region contain the rectangle rect?
|
||||
wxRegionContain Contains(const wxRect& rect) const;
|
||||
|
||||
// Internal
|
||||
bool Combine(long x, long y, long width, long height, wxRegionOp op);
|
||||
bool Combine(const wxRegion& region, wxRegionOp op);
|
||||
bool Combine(const wxRect& rect, wxRegionOp op);
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxRegionIterator : public wxObject {
|
||||
DECLARE_DYNAMIC_CLASS(wxRegionIterator);
|
||||
public:
|
||||
wxRegionIterator(void);
|
||||
wxRegionIterator(const wxRegion& region);
|
||||
~wxRegionIterator(void);
|
||||
|
||||
void Reset(void) { m_current = 0; }
|
||||
void Reset(const wxRegion& region);
|
||||
|
||||
operator bool (void) const { return m_current < m_numRects; }
|
||||
bool HaveRects(void) const { return m_current < m_numRects; }
|
||||
|
||||
void operator ++ (void);
|
||||
void operator ++ (int);
|
||||
|
||||
long GetX(void) const;
|
||||
long GetY(void) const;
|
||||
long GetW(void) const;
|
||||
long GetWidth(void) const { return GetW(); }
|
||||
long GetH(void) const;
|
||||
long GetHeight(void) const { return GetH(); }
|
||||
|
||||
private:
|
||||
long m_current;
|
||||
long m_numRects;
|
||||
wxRegion m_region;
|
||||
wxRect* m_rects;
|
||||
};
|
||||
|
||||
#endif
|
||||
// __REGIONH__
|
||||
@@ -0,0 +1,184 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msw/registry.h
|
||||
// Purpose: Registry classes and functions
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 03.04.198
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _REGISTRY_H
|
||||
#define _REGISTRY_H
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// mutable hack (see also registry.cpp)
|
||||
// ----------------------------------------------------------------------------
|
||||
#if USE_MUTABLE
|
||||
#define MUTABLE mutable
|
||||
#else
|
||||
#define MUTABLE
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// forward decl for handle type
|
||||
// ----------------------------------------------------------------------------
|
||||
#ifndef HKEY_DEFINED
|
||||
#define HKEY_DEFINED
|
||||
#define HKEY unsigned long
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// class wxRegKey encapsulates window HKEY handle
|
||||
// ----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxRegKey
|
||||
{
|
||||
public:
|
||||
// NB: do _not_ change the values of elements in these enumerations!
|
||||
|
||||
// registry value types (with comments from winnt.h)
|
||||
enum ValueType
|
||||
{
|
||||
Type_None, // No value type
|
||||
Type_String, // Unicode nul terminated string
|
||||
#ifdef __WIN32__
|
||||
Type_Expand_String, // Unicode nul terminated string
|
||||
// (with environment variable references)
|
||||
Type_Binary, // Free form binary
|
||||
Type_Dword, // 32-bit number
|
||||
Type_Dword_little_endian, // 32-bit number (same as Type_DWORD)
|
||||
Type_Dword_big_endian, // 32-bit number
|
||||
Type_Link, // Symbolic Link (unicode)
|
||||
Type_Multi_String, // Multiple Unicode strings
|
||||
Type_Resource_list, // Resource list in the resource map
|
||||
Type_Full_resource_descriptor, // Resource list in the hardware description
|
||||
Type_Resource_requirements_list, // ???
|
||||
#endif //WIN32
|
||||
};
|
||||
|
||||
// predefined registry keys
|
||||
enum StdKey
|
||||
{
|
||||
HKCR, // classes root
|
||||
#ifdef __WIN32__
|
||||
HKCU, // current user
|
||||
HKLM, // local machine
|
||||
HKUSR, // users
|
||||
HKPD, // performance data (@@ NT only?)
|
||||
#if WINVER >= 0x0400
|
||||
HKCC, // current config
|
||||
HKDD, // dynamic data
|
||||
#endif // Winver
|
||||
#endif // Win32/16
|
||||
};
|
||||
|
||||
// information about standard (predefined) registry keys
|
||||
// number of standard keys
|
||||
static const size_t nStdKeys;
|
||||
// get the name of a standard key
|
||||
static const char *GetStdKeyName(uint key);
|
||||
// get the short name of a standard key
|
||||
static const char *GetStdKeyShortName(uint key);
|
||||
// get StdKey from root HKEY
|
||||
static StdKey GetStdKeyFromHkey(HKEY hkey);
|
||||
|
||||
// extacts the std key prefix from the string (return value) and
|
||||
// leaves only the part after it (i.e. modifies the string passed!)
|
||||
static StdKey ExtractKeyName(wxString& str);
|
||||
|
||||
// ctors
|
||||
// root key is set to HKCR (the only root key under Win16)
|
||||
wxRegKey();
|
||||
// strKey is the full name of the key (i.e. starting with HKEY_xxx...)
|
||||
wxRegKey(const wxString& strKey);
|
||||
// strKey is the name of key under (standard key) keyParent
|
||||
wxRegKey(StdKey keyParent, const wxString& strKey);
|
||||
// strKey is the name of key under (previously created) keyParent
|
||||
wxRegKey(const wxRegKey& keyParent, const wxString& strKey);
|
||||
//
|
||||
~wxRegKey();
|
||||
|
||||
// change key (closes the previously opened key if any)
|
||||
void SetName(const wxString& strKey);
|
||||
void SetHkey(HKEY hKey);
|
||||
|
||||
// get infomation about the key
|
||||
// get the (full) key name. Abbreviate std root keys if bShortPrefix.
|
||||
wxString GetName(bool bShortPrefix = TRUE) const;
|
||||
// return TRUE if the key exists
|
||||
bool Exists() const;
|
||||
// return TRUE if the key is opened
|
||||
bool IsOpened() const { return m_hKey != 0; }
|
||||
// for "if ( !key ) wxLogError(...)" kind of expressions
|
||||
operator bool() const { return m_dwLastError == 0; }
|
||||
|
||||
// operations on the key itself
|
||||
// explicitly open the key (will be automatically done by all functions
|
||||
// which need the key to be opened if the key is not opened yet)
|
||||
bool Open();
|
||||
// create the key: will fail if the key already exists and bOkIfExists
|
||||
bool Create(bool bOkIfExists = TRUE);
|
||||
// close the key (will be automatically done in dtor)
|
||||
bool Close();
|
||||
|
||||
// deleting keys/values
|
||||
// deletes this key and all of it's subkeys/values
|
||||
bool DeleteSelf();
|
||||
// deletes the subkey with all of it's subkeys/values recursively
|
||||
bool DeleteKey(const char *szKey);
|
||||
// deletes the named value (may be NULL to remove the default value)
|
||||
bool DeleteValue(const char *szValue);
|
||||
|
||||
// access to values and subkeys
|
||||
// get value type
|
||||
ValueType GetValueType(const char *szValue);
|
||||
|
||||
// assignment operators set the default value of the key
|
||||
wxRegKey& operator=(const wxString& strValue)
|
||||
{ SetValue(NULL, strValue); return *this; }
|
||||
wxRegKey& operator=(long lValue)
|
||||
{ SetValue(NULL, lValue); return *this; }
|
||||
|
||||
// conversion operators query the default value of the key
|
||||
operator wxString() const;
|
||||
|
||||
// set the string value
|
||||
bool SetValue(const char *szValue, const wxString& strValue);
|
||||
// return the string value
|
||||
bool QueryValue(const char *szValue, wxString& strValue) const;
|
||||
|
||||
#ifdef __WIN32__
|
||||
// set the numeric value
|
||||
bool SetValue(const char *szValue, long lValue);
|
||||
// return the numeric value
|
||||
bool QueryValue(const char *szValue, long *plValue) const;
|
||||
#endif //Win32
|
||||
|
||||
// return TRUE if given subkey exists
|
||||
bool HasSubKey(const char *szKey) const;
|
||||
// return TRUE if any subkeys exist
|
||||
bool HasSubkeys() const;
|
||||
|
||||
// enumerate values and subkeys
|
||||
#ifdef __WIN32__
|
||||
bool GetFirstValue(wxString& strValueName, long& lIndex);
|
||||
bool GetNextValue (wxString& strValueName, long& lIndex) const;
|
||||
#endif //Win32
|
||||
|
||||
bool GetFirstKey (wxString& strKeyName , long& lIndex);
|
||||
bool GetNextKey (wxString& strKeyName , long& lIndex) const;
|
||||
|
||||
private:
|
||||
// no copy ctor/assignment operator
|
||||
wxRegKey(const wxRegKey& key); // not implemented
|
||||
wxRegKey& operator=(const wxRegKey& key); // not implemented
|
||||
|
||||
HKEY m_hKey, // our handle
|
||||
m_hRootKey; // handle of the top key (i.e. StdKey)
|
||||
wxString m_strKey; // key name (relative to m_hRootKey)
|
||||
|
||||
MUTABLE long m_dwLastError; // last error (0 if none)
|
||||
};
|
||||
|
||||
#endif //_REGISTRY_H
|
||||
|
After Width: | Height: | Size: 326 B |
@@ -0,0 +1,91 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: scrollbar.h
|
||||
// Purpose: wxScrollBar class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __SCROLBARH__
|
||||
#define __SCROLBARH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "scrolbar.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxScrollBarNameStr;
|
||||
|
||||
// Scrollbar item
|
||||
class WXDLLEXPORT wxScrollBar: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxScrollBar)
|
||||
|
||||
public:
|
||||
inline wxScrollBar(void) { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; }
|
||||
~wxScrollBar(void);
|
||||
|
||||
inline wxScrollBar(wxWindow *parent, const wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = wxSB_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxScrollBarNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, style, validator, name);
|
||||
}
|
||||
bool Create(wxWindow *parent, const wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = wxSB_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxScrollBarNameStr);
|
||||
|
||||
int GetPosition(void) const ;
|
||||
inline int GetThumbSize() const { return m_pageSize; }
|
||||
inline int GetPageSize() const { return m_viewSize; }
|
||||
inline int GetRange() const { return m_objectSize; }
|
||||
|
||||
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);
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
// Backward compatibility
|
||||
inline int GetValue(void) const { return GetPosition(); }
|
||||
inline void SetValue(const int viewStart) { SetPosition(viewStart); }
|
||||
void GetValues(int *viewStart, int *viewLength, int *objectLength,
|
||||
int *pageLength) const ;
|
||||
inline int GetViewLength() const { return m_viewSize; }
|
||||
inline int GetObjectLength() const { return m_objectSize; }
|
||||
|
||||
void SetPageSize(const int pageLength);
|
||||
void SetObjectLength(const int objectLength);
|
||||
void SetViewLength(const int viewLength);
|
||||
#endif
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
void MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control);
|
||||
void MSWOnHScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control);
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
// Backward compatibility: generate an old-style scroll command
|
||||
void OnScroll(wxScrollEvent& event);
|
||||
#endif
|
||||
|
||||
protected:
|
||||
int m_pageSize;
|
||||
int m_viewSize;
|
||||
int m_objectSize;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// __SCROLBARH__
|
||||
@@ -0,0 +1,129 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: settings.h
|
||||
// Purpose: wxSystemSettings class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __SETTINGSH__
|
||||
#define __SETTINGSH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "settings.h"
|
||||
#endif
|
||||
|
||||
#include "wx/setup.h"
|
||||
|
||||
#define wxSYS_WHITE_BRUSH 0
|
||||
#define wxSYS_LTGRAY_BRUSH 1
|
||||
#define wxSYS_GRAY_BRUSH 2
|
||||
#define wxSYS_DKGRAY_BRUSH 3
|
||||
#define wxSYS_BLACK_BRUSH 4
|
||||
#define wxSYS_NULL_BRUSH 5
|
||||
#define wxSYS_HOLLOW_BRUSH wxSYS_NULL_BRUSH
|
||||
#define wxSYS_WHITE_PEN 6
|
||||
#define wxSYS_BLACK_PEN 7
|
||||
#define wxSYS_NULL_PEN 8
|
||||
#define wxSYS_OEM_FIXED_FONT 10
|
||||
#define wxSYS_ANSI_FIXED_FONT 11
|
||||
#define wxSYS_ANSI_VAR_FONT 12
|
||||
#define wxSYS_SYSTEM_FONT 13
|
||||
#define wxSYS_DEVICE_DEFAULT_FONT 14
|
||||
#define wxSYS_DEFAULT_PALETTE 15
|
||||
#define wxSYS_SYSTEM_FIXED_FONT 16 // Obsolete
|
||||
#define wxSYS_DEFAULT_GUI_FONT 17
|
||||
|
||||
#define wxSYS_COLOUR_SCROLLBAR 0
|
||||
#define wxSYS_COLOUR_BACKGROUND 1
|
||||
#define wxSYS_COLOUR_ACTIVECAPTION 2
|
||||
#define wxSYS_COLOUR_INACTIVECAPTION 3
|
||||
#define wxSYS_COLOUR_MENU 4
|
||||
#define wxSYS_COLOUR_WINDOW 5
|
||||
#define wxSYS_COLOUR_WINDOWFRAME 6
|
||||
#define wxSYS_COLOUR_MENUTEXT 7
|
||||
#define wxSYS_COLOUR_WINDOWTEXT 8
|
||||
#define wxSYS_COLOUR_CAPTIONTEXT 9
|
||||
#define wxSYS_COLOUR_ACTIVEBORDER 10
|
||||
#define wxSYS_COLOUR_INACTIVEBORDER 11
|
||||
#define wxSYS_COLOUR_APPWORKSPACE 12
|
||||
#define wxSYS_COLOUR_HIGHLIGHT 13
|
||||
#define wxSYS_COLOUR_HIGHLIGHTTEXT 14
|
||||
#define wxSYS_COLOUR_BTNFACE 15
|
||||
#define wxSYS_COLOUR_BTNSHADOW 16
|
||||
#define wxSYS_COLOUR_GRAYTEXT 17
|
||||
#define wxSYS_COLOUR_BTNTEXT 18
|
||||
#define wxSYS_COLOUR_INACTIVECAPTIONTEXT 19
|
||||
#define wxSYS_COLOUR_BTNHIGHLIGHT 20
|
||||
|
||||
#define wxSYS_COLOUR_3DDKSHADOW 21
|
||||
#define wxSYS_COLOUR_3DLIGHT 22
|
||||
#define wxSYS_COLOUR_INFOTEXT 23
|
||||
#define wxSYS_COLOUR_INFOBK 24
|
||||
|
||||
#define wxSYS_COLOUR_DESKTOP wxSYS_COLOUR_BACKGROUND
|
||||
#define wxSYS_COLOUR_3DFACE wxSYS_COLOUR_BTNFACE
|
||||
#define wxSYS_COLOUR_3DSHADOW wxSYS_COLOUR_BTNSHADOW
|
||||
#define wxSYS_COLOUR_3DHIGHLIGHT wxSYS_COLOUR_BTNHIGHLIGHT
|
||||
#define wxSYS_COLOUR_3DHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT
|
||||
#define wxSYS_COLOUR_BTNHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT
|
||||
|
||||
// Metrics
|
||||
#define wxSYS_MOUSE_BUTTONS 1
|
||||
#define wxSYS_BORDER_X 2
|
||||
#define wxSYS_BORDER_Y 3
|
||||
#define wxSYS_CURSOR_X 4
|
||||
#define wxSYS_CURSOR_Y 5
|
||||
#define wxSYS_DCLICK_X 6
|
||||
#define wxSYS_DCLICK_Y 7
|
||||
#define wxSYS_DRAG_X 8
|
||||
#define wxSYS_DRAG_Y 9
|
||||
#define wxSYS_EDGE_X 10
|
||||
#define wxSYS_EDGE_Y 11
|
||||
#define wxSYS_HSCROLL_ARROW_X 12
|
||||
#define wxSYS_HSCROLL_ARROW_Y 13
|
||||
#define wxSYS_HTHUMB_X 14
|
||||
#define wxSYS_ICON_X 15
|
||||
#define wxSYS_ICON_Y 16
|
||||
#define wxSYS_ICONSPACING_X 17
|
||||
#define wxSYS_ICONSPACING_Y 18
|
||||
#define wxSYS_WINDOWMIN_X 19
|
||||
#define wxSYS_WINDOWMIN_Y 20
|
||||
#define wxSYS_SCREEN_X 21
|
||||
#define wxSYS_SCREEN_Y 22
|
||||
#define wxSYS_FRAMESIZE_X 23
|
||||
#define wxSYS_FRAMESIZE_Y 24
|
||||
#define wxSYS_SMALLICON_X 25
|
||||
#define wxSYS_SMALLICON_Y 26
|
||||
#define wxSYS_HSCROLL_Y 27
|
||||
#define wxSYS_VSCROLL_X 28
|
||||
#define wxSYS_VSCROLL_ARROW_X 29
|
||||
#define wxSYS_VSCROLL_ARROW_Y 30
|
||||
#define wxSYS_VTHUMB_Y 31
|
||||
#define wxSYS_CAPTION_Y 32
|
||||
#define wxSYS_MENU_Y 33
|
||||
#define wxSYS_NETWORK_PRESENT 34
|
||||
#define wxSYS_PENWINDOWS_PRESENT 35
|
||||
#define wxSYS_SHOW_SOUNDS 36
|
||||
#define wxSYS_SWAP_BUTTONS 37
|
||||
|
||||
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
|
||||
// __SETTINGSH__
|
||||
|
After Width: | Height: | Size: 326 B |
@@ -0,0 +1,110 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: slider.h
|
||||
// Purpose: wxSlider class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __SLIDERH__
|
||||
#define __SLIDERH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "slider.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
|
||||
|
||||
// Slider
|
||||
class WXDLLEXPORT wxSlider: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxSlider)
|
||||
|
||||
public:
|
||||
wxSlider(void);
|
||||
|
||||
inline 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)
|
||||
{
|
||||
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
~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 ;
|
||||
bool Show(const bool show);
|
||||
|
||||
void SetRange(const int minValue, const int maxValue);
|
||||
|
||||
inline int GetMin(void) const { return m_rangeMin; }
|
||||
inline int GetMax(void) const { return m_rangeMax; }
|
||||
|
||||
// For trackbars only
|
||||
void SetTickFreq(const int n, const int pos);
|
||||
inline int GetTickFreq(void) const { return m_tickFreq; }
|
||||
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) ;
|
||||
|
||||
// IMPLEMENTATION
|
||||
inline WXHWND GetStaticMin() const { return m_staticMin; }
|
||||
inline WXHWND GetStaticMax() const { return m_staticMax; }
|
||||
inline WXHWND GetEditValue() const { return m_staticValue; }
|
||||
virtual bool ContainsHWND(WXHWND hWnd) const;
|
||||
|
||||
// Backward compatibility: translate to familiar wxEVT_COMMAND_SLIDER_UPDATED
|
||||
#if WXWIN_COMPATIBILITY
|
||||
void OnScroll(wxScrollEvent& event);
|
||||
#endif
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
void MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control);
|
||||
void MSWOnHScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control);
|
||||
|
||||
protected:
|
||||
WXHWND m_staticMin;
|
||||
WXHWND m_staticMax;
|
||||
WXHWND m_staticValue;
|
||||
int m_rangeMin;
|
||||
int m_rangeMax;
|
||||
int m_pageSize;
|
||||
int m_lineSize;
|
||||
int m_tickFreq;
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// __SLIDERH__
|
||||
@@ -0,0 +1,107 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: spinbutt.h
|
||||
// Purpose: wxSpinButton class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __SPINBUTTH__
|
||||
#define __SPINBUTTH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "spinbutt.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
#include "wx/event.h"
|
||||
|
||||
#if defined(__WIN95__)
|
||||
|
||||
/*
|
||||
The wxSpinButton is like a small scrollbar than is often placed next
|
||||
to a text control.
|
||||
|
||||
wxSP_HORIZONTAL: horizontal spin button
|
||||
wxSP_VERTICAL: vertical spin button (the default)
|
||||
wxSP_ARROW_KEYS: arrow keys increment/decrement value
|
||||
wxSP_WRAP: value wraps at either end
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxSpinButton: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxSpinButton)
|
||||
public:
|
||||
/*
|
||||
* Public interface
|
||||
*/
|
||||
|
||||
wxSpinButton(void);
|
||||
|
||||
inline wxSpinButton(wxWindow *parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
const long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton")
|
||||
{
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
~wxSpinButton(void);
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
const long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton");
|
||||
|
||||
|
||||
// Attributes
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int GetValue(void) const ;
|
||||
void SetValue(const int val) ;
|
||||
void SetRange(const int minVal, const int maxVal) ;
|
||||
inline int GetMin(void) const { return m_min; }
|
||||
inline int GetMax(void) const { return m_max; }
|
||||
|
||||
// Operations
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Command(wxCommandEvent& event) { ProcessCommand(event); };
|
||||
|
||||
// IMPLEMENTATION
|
||||
bool MSWCommand(const WXUINT param, const WXWORD id);
|
||||
bool MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam);
|
||||
void MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control);
|
||||
void MSWOnHScroll(const WXWORD wParam, const WXWORD pos, const WXHWND control);
|
||||
|
||||
protected:
|
||||
int m_min;
|
||||
int m_max;
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxSpinEvent: public wxScrollEvent
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxSpinEvent)
|
||||
|
||||
public:
|
||||
wxSpinEvent(WXTYPE commandType = 0, int id = 0);
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&);
|
||||
|
||||
// Spin events
|
||||
|
||||
#define EVT_SPIN_UP(id, func) { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func }
|
||||
#define EVT_SPIN_DOWN(id, func) { wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func }
|
||||
|
||||
#define EVT_SPIN(id, func) \
|
||||
{ wxEVT_SCROLL_TOP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\
|
||||
{ wxEVT_SCROLL_BOTTOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\
|
||||
{ wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\
|
||||
{ wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\
|
||||
{ wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\
|
||||
{ wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },\
|
||||
{ wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },
|
||||
|
||||
#endif
|
||||
// __WIN95__
|
||||
#endif
|
||||
// __SPINBUTTH__
|
||||
@@ -0,0 +1,64 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: statbmp.h
|
||||
// Purpose: wxStaticBitmap class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __STATBMPH__
|
||||
#define __STATBMPH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "statbmp.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr;
|
||||
|
||||
class WXDLLEXPORT wxStaticBitmap: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
||||
public:
|
||||
inline wxStaticBitmap(void) { }
|
||||
|
||||
inline wxStaticBitmap(wxWindow *parent, const wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = 0,
|
||||
const wxString& name = wxStaticBitmapNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = 0,
|
||||
const wxString& name = wxStaticBitmapNameStr);
|
||||
|
||||
virtual void SetBitmap(const wxBitmap& bitmap);
|
||||
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
||||
|
||||
void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
inline wxBitmap& GetBitmap(void) const { return (wxBitmap&) m_messageBitmap; }
|
||||
|
||||
// Implementation
|
||||
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
protected:
|
||||
wxBitmap m_messageBitmap;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
// __STATBMPH__
|
||||
@@ -0,0 +1,63 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: statbox.h
|
||||
// Purpose: wxStaticBox class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __STATBOXH__
|
||||
#define __STATBOXH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "statbox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxStaticBoxNameStr;
|
||||
|
||||
// Group box
|
||||
class WXDLLEXPORT wxStaticBox: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticBox)
|
||||
|
||||
public:
|
||||
inline wxStaticBox(void) {}
|
||||
inline wxStaticBox(wxWindow *parent, const wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = 0,
|
||||
const wxString& name = wxStaticBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = 0,
|
||||
const wxString& name = wxStaticBoxNameStr);
|
||||
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
||||
|
||||
void OnEraseBackground(wxEraseEvent& event);
|
||||
|
||||
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
|
||||
void SetLabel(const wxString& label);
|
||||
virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// __STATBOXH__
|
||||
@@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msw/statbr95.h
|
||||
// Purpose: native implementation of wxStatusBar
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 04.04.98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _STATBR95_H
|
||||
#define _STATBR95_H
|
||||
|
||||
#if USE_NATIVE_STATUSBAR
|
||||
|
||||
class WXDLLEXPORT wxStatusBar95 : public wxStatusBar
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxStatusBar95);
|
||||
|
||||
public:
|
||||
// ctors
|
||||
wxStatusBar95();
|
||||
wxStatusBar95(wxWindow *parent, wxWindowID id = -1, long style = wxSB_SIZEGRIP);
|
||||
|
||||
// create status line
|
||||
bool Create(wxWindow *parent, wxWindowID id = -1, long style = wxSB_SIZEGRIP);
|
||||
|
||||
// a status line can have several (<256) fields numbered from 0
|
||||
virtual void SetFieldsCount(int number = 1, const int *widths = NULL);
|
||||
|
||||
// each field of status line has it's own text
|
||||
virtual void SetStatusText(const wxString& text, const int number = 0);
|
||||
virtual wxString GetStatusText(int number = 0) const;
|
||||
|
||||
// set status line fields' widths
|
||||
virtual void SetStatusWidths(int n, const int *widths_field);
|
||||
|
||||
// we're going to process WM_SIZE (of the parent window)
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
protected:
|
||||
void CopyFieldsWidth(const int *widths);
|
||||
void SetFieldsWidth();
|
||||
};
|
||||
|
||||
#endif // USE_NATIVE_STATUSBAR
|
||||
|
||||
#endif //_STATBR95_H
|
||||
@@ -0,0 +1,60 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: stattext.h
|
||||
// Purpose: wxStaticText class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __STATTEXTH__
|
||||
#define __STATTEXTH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "stattext.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxStaticTextNameStr;
|
||||
|
||||
class WXDLLEXPORT wxStaticText: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticText)
|
||||
public:
|
||||
inline wxStaticText(void) { }
|
||||
|
||||
inline wxStaticText(wxWindow *parent, const wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = 0,
|
||||
const wxString& name = wxStaticTextNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = 0,
|
||||
const wxString& name = wxStaticTextNameStr);
|
||||
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
||||
|
||||
void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
void SetLabel(const wxString&);
|
||||
|
||||
virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
};
|
||||
|
||||
#endif
|
||||
// __STATTEXTH__
|
||||
@@ -0,0 +1,148 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: tabctrl.h
|
||||
// Purpose: wxTabCtrl class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __TABCTRLH__
|
||||
#define __TABCTRLH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "tabctrl.h"
|
||||
#endif
|
||||
|
||||
class wxImageList;
|
||||
|
||||
// WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr;
|
||||
|
||||
/*
|
||||
* Flags returned by HitTest
|
||||
*/
|
||||
|
||||
#define wxTAB_HITTEST_NOWHERE 1
|
||||
#define wxTAB_HITTEST_ONICON 2
|
||||
#define wxTAB_HITTEST_ONLABEL 4
|
||||
#define wxTAB_HITTEST_ONITEM 6
|
||||
|
||||
class WXDLLEXPORT wxTabCtrl: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTabCtrl)
|
||||
public:
|
||||
/*
|
||||
* Public interface
|
||||
*/
|
||||
|
||||
wxTabCtrl(void);
|
||||
|
||||
inline wxTabCtrl(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
const long style = 0, const wxString& name = "tabCtrl")
|
||||
{
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
~wxTabCtrl(void);
|
||||
|
||||
// Accessors
|
||||
|
||||
// Get the selection
|
||||
int GetSelection(void) const;
|
||||
|
||||
// Get the associated image list
|
||||
wxImageList* GetImageList(void) const;
|
||||
|
||||
// Get the number of items
|
||||
int GetItemCount(void) const;
|
||||
|
||||
// Get the rect corresponding to the tab
|
||||
bool GetItemRect(const int item, wxRect& rect) const;
|
||||
|
||||
// Get the number of rows
|
||||
int GetRowCount(void) const;
|
||||
|
||||
// Get the item text
|
||||
wxString GetItemText(const int item) const ;
|
||||
|
||||
// Get the item image
|
||||
int GetItemImage(const int item) const;
|
||||
|
||||
// Get the item data
|
||||
void* GetItemData(const int item) const;
|
||||
|
||||
// Set the selection
|
||||
int SetSelection(const int item);
|
||||
|
||||
// Set the image list
|
||||
void SetImageList(wxImageList* imageList);
|
||||
|
||||
// Set the text for an item
|
||||
bool SetItemText(const int item, const wxString& text);
|
||||
|
||||
// Set the image for an item
|
||||
bool SetItemImage(const int item, const int image);
|
||||
|
||||
// Set the data for an item
|
||||
bool SetItemData(const int item, void* data);
|
||||
|
||||
// Set the size for a fixed-width tab control
|
||||
void SetItemSize(const wxSize& size);
|
||||
|
||||
// Set the padding between tabs
|
||||
void SetPadding(const wxSize& padding);
|
||||
|
||||
// Operations
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
const long style = 0, const wxString& name = "tabCtrl");
|
||||
|
||||
// Delete all items
|
||||
bool DeleteAllItems(void);
|
||||
|
||||
// Delete an item
|
||||
bool DeleteItem(const int item);
|
||||
|
||||
// Hit test
|
||||
int HitTest(const wxPoint& pt, long& flags);
|
||||
|
||||
// Insert an item
|
||||
int InsertItem(const int item, const wxString& text, const int imageId = -1, void* data = NULL);
|
||||
|
||||
// Implementation
|
||||
|
||||
// Call default behaviour
|
||||
void OnPaint(wxPaintEvent& event) { Default() ; }
|
||||
void OnSize(wxSizeEvent& event) { Default() ; }
|
||||
void OnMouseEvent(wxMouseEvent& event) { Default() ; }
|
||||
void OnKillFocus(wxFocusEvent& event) { Default() ; }
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
bool MSWCommand(const WXUINT param, const WXWORD id);
|
||||
bool MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam);
|
||||
|
||||
// Responds to colour changes
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
protected:
|
||||
wxImageList* m_imageList;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxTabEvent: public wxCommandEvent
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTabEvent)
|
||||
|
||||
public:
|
||||
wxTabEvent(WXTYPE commandType = 0, int id = 0);
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&);
|
||||
|
||||
#define EVT_TAB_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TAB_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn },
|
||||
#define EVT_TAB_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TAB_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn },
|
||||
|
||||
#endif
|
||||
// __TABCTRLH__
|
||||
@@ -0,0 +1,66 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// File: taskbar.h
|
||||
// Purpose: Defines wxTaskBarIcon class for manipulating icons on the
|
||||
// Windows task bar.
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 24/3/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _TASKBAR_H_
|
||||
#define _TASKBAR_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "taskbar.h"
|
||||
#endif
|
||||
|
||||
#include <wx/list.h>
|
||||
#include <wx/icon.h>
|
||||
|
||||
class wxTaskBarIcon: public wxObject
|
||||
{
|
||||
public:
|
||||
wxTaskBarIcon(void);
|
||||
virtual ~wxTaskBarIcon(void);
|
||||
|
||||
// Accessors
|
||||
inline WXHWND GetHWND() const { return m_hWnd; }
|
||||
inline bool IsOK() const { return (m_hWnd != 0) ; }
|
||||
inline bool IsIconInstalled() const { return m_iconAdded; }
|
||||
|
||||
// Operations
|
||||
bool SetIcon(const wxIcon& icon, const wxString& tooltip = "");
|
||||
bool RemoveIcon(void);
|
||||
|
||||
// Overridables
|
||||
virtual void OnMouseMove(void);
|
||||
virtual void OnLButtonDown(void);
|
||||
virtual void OnLButtonUp(void);
|
||||
virtual void OnRButtonDown(void);
|
||||
virtual void OnRButtonUp(void);
|
||||
virtual void OnLButtonDClick(void);
|
||||
virtual void OnRButtonDClick(void);
|
||||
|
||||
// Implementation
|
||||
static wxTaskBarIcon* FindObjectForHWND(WXHWND hWnd);
|
||||
static void AddObject(wxTaskBarIcon* obj);
|
||||
static void RemoveObject(wxTaskBarIcon* obj);
|
||||
static bool RegisterWindowClass();
|
||||
static WXHWND CreateTaskBarWindow();
|
||||
long WindowProc( WXHWND hWnd, unsigned int msg, unsigned int wParam, long lParam );
|
||||
|
||||
// Data members
|
||||
protected:
|
||||
WXHWND m_hWnd;
|
||||
bool m_iconAdded;
|
||||
static wxList sm_taskBarIcons;
|
||||
static bool sm_registeredClass;
|
||||
static unsigned int sm_taskbarMsg;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _TASKBAR_H_
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: tbar95.h
|
||||
// Purpose: wxToolBar95 (Windows 95 toolbar) class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __TBAR95H__
|
||||
#define __TBAR95H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "tbar95.h"
|
||||
#endif
|
||||
|
||||
#if USE_BUTTONBAR && USE_TOOLBAR
|
||||
#include "wx/tbarbase.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr;
|
||||
|
||||
#define DEFAULTBITMAPX 16
|
||||
#define DEFAULTBITMAPY 15
|
||||
#define DEFAULTBUTTONX 24
|
||||
#define DEFAULTBUTTONY 24
|
||||
#define DEFAULTBARHEIGHT 27
|
||||
|
||||
class WXDLLEXPORT wxToolBar95: public wxToolBarBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxToolBar95)
|
||||
public:
|
||||
/*
|
||||
* Public interface
|
||||
*/
|
||||
|
||||
wxToolBar95(void);
|
||||
|
||||
#if WXWIN_COMPATIBILITY > 0
|
||||
inline wxToolBar95(wxWindow *parent, int x, int y, int w, int h,
|
||||
long style = wxNO_BORDER, int orientation = wxVERTICAL, int RowsOrColumns = 2,
|
||||
const char *name = wxToolBarNameStr)
|
||||
{
|
||||
Create(parent, -1, wxPoint(x, y), wxSize(w, h), style, orientation, RowsOrColumns, name);
|
||||
}
|
||||
#endif
|
||||
inline wxToolBar95(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
const long style = wxNO_BORDER, const int orientation = wxVERTICAL,
|
||||
const int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, style, orientation, RowsOrColumns, name);
|
||||
}
|
||||
~wxToolBar95(void);
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
const long style = wxNO_BORDER, const int orientation = wxVERTICAL,
|
||||
const int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr);
|
||||
|
||||
// Call default behaviour
|
||||
void OnPaint(wxPaintEvent& event) { Default() ; }
|
||||
void OnSize(wxSizeEvent& event) { Default() ; }
|
||||
void OnMouseEvent(wxMouseEvent& event) { Default() ; }
|
||||
void OnKillFocus(wxFocusEvent& event) { Default() ; }
|
||||
|
||||
// Handle wxToolBar95 events
|
||||
|
||||
// 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.
|
||||
wxToolBarTool *AddTool(const int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap,
|
||||
const bool toggle = FALSE, const long xPos = -1, const long yPos = -1, wxObject *clientData = NULL,
|
||||
const wxString& helpString1 = "", const wxString& helpString2 = "");
|
||||
|
||||
// New members
|
||||
// Set default bitmap size
|
||||
void SetDefaultSize(const wxSize& size);
|
||||
void EnableTool(const int toolIndex, const bool enable); // additional drawing on enabling
|
||||
void ToggleTool(const int toolIndex, const bool toggle); // toggle is TRUE if toggled on
|
||||
void ClearTools(void);
|
||||
|
||||
// The button size is bigger than the bitmap size
|
||||
wxSize GetDefaultButtonSize(void) const;
|
||||
|
||||
wxSize GetMaxSize(void) const;
|
||||
void GetSize(int *w, int *y) const;
|
||||
|
||||
// Add all the buttons: required for Win95.
|
||||
virtual bool CreateTools(void);
|
||||
virtual void SetRows(const int nRows);
|
||||
virtual void Layout(void) {}
|
||||
|
||||
// IMPLEMENTATION
|
||||
bool MSWCommand(const WXUINT param, const WXWORD id);
|
||||
bool MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam);
|
||||
|
||||
// Responds to colour changes
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
protected:
|
||||
WXHBITMAP m_hBitmap;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // USE_TOOL/BUTTONBAR
|
||||
#endif
|
||||
// __TBAR95H__
|
||||
@@ -0,0 +1,130 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: tbarmsw.h
|
||||
// Purpose: wxToolBarMSW class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __TBARMSWH__
|
||||
#define __TBARMSWH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "tbarmsw.h"
|
||||
#endif
|
||||
|
||||
#if USE_BUTTONBAR && USE_TOOLBAR
|
||||
#include "wx/tbarbase.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxButtonBarNameStr;
|
||||
|
||||
// Non-Win95 (WIN32, WIN16, UNIX) version
|
||||
|
||||
class WXDLLEXPORT wxToolBarMSW: public wxToolBarBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxToolBarMSW)
|
||||
public:
|
||||
/*
|
||||
* Public interface
|
||||
*/
|
||||
wxToolBarMSW(void);
|
||||
|
||||
#if WXWIN_COMPATIBILITY > 0
|
||||
inline wxToolBarMSW(wxWindow *parent, int x, int y, int w, int h,
|
||||
long style = wxNO_BORDER, int orientation = wxVERTICAL, int RowsOrColumns = 2,
|
||||
const char *name = wxButtonBarNameStr)
|
||||
{
|
||||
Create(parent, -1, wxPoint(x, y), wxSize(w, h), style, orientation, RowsOrColumns, name);
|
||||
}
|
||||
#endif
|
||||
inline wxToolBarMSW(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
const long style = wxNO_BORDER, const int orientation = wxVERTICAL,
|
||||
const int RowsOrColumns = 2, const wxString& name = wxButtonBarNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, style, orientation, RowsOrColumns, name);
|
||||
}
|
||||
bool Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
const long style = wxNO_BORDER, const int orientation = wxVERTICAL,
|
||||
const int RowsOrColumns = 2, const wxString& name = wxButtonBarNameStr);
|
||||
|
||||
~wxToolBarMSW(void);
|
||||
|
||||
// Handle wxWindows events
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
|
||||
// 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.
|
||||
wxToolBarTool *AddTool(const int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap,
|
||||
const bool toggle = FALSE, const long xPos = -1, const long yPos = -1, wxObject *clientData = NULL,
|
||||
const wxString& helpString1 = "", const wxString& helpString2 = "");
|
||||
|
||||
void DrawTool(wxDC& dc, wxMemoryDC& memDc, wxToolBarTool *tool);
|
||||
|
||||
// New members
|
||||
// Set default bitmap size
|
||||
virtual void SetDefaultSize(const wxSize& size);
|
||||
void EnableTool(const int toolIndex, const bool enable); // additional drawing on enabling
|
||||
|
||||
// The button size is bigger than the bitmap size
|
||||
wxSize GetDefaultButtonSize(void) const;
|
||||
protected:
|
||||
void DrawTool(wxDC& dc, wxToolBarTool *tool, int state);
|
||||
|
||||
void GetSysColors(void);
|
||||
bool InitGlobalObjects(void);
|
||||
void FreeGlobalObjects(void);
|
||||
void PatB(WXHDC hdc,int x,int y,int dx,int dy, long rgb);
|
||||
void CreateMask(WXHDC hDC, int xoffset, int yoffset, int dx, int dy);
|
||||
void DrawBlankButton(WXHDC hdc, int x, int y, int dx, int dy, int state);
|
||||
void DrawButton(WXHDC hdc, int x, int y, int dx, int dy, wxToolBarTool *tool, int state);
|
||||
WXHBITMAP CreateDitherBitmap();
|
||||
bool CreateDitherBrush(void);
|
||||
bool FreeDitherBrush(void);
|
||||
WXHBITMAP CreateMappedBitmap(WXHINSTANCE hInstance, void *lpBitmapInfo);
|
||||
WXHBITMAP CreateMappedBitmap(WXHINSTANCE hInstance, WXHBITMAP hBitmap);
|
||||
|
||||
protected:
|
||||
|
||||
WXHBRUSH m_hbrDither;
|
||||
WXDWORD m_rgbFace;
|
||||
WXDWORD m_rgbShadow;
|
||||
WXDWORD m_rgbHilight;
|
||||
WXDWORD m_rgbFrame;
|
||||
|
||||
//
|
||||
// m_hdcMono is the DC that holds a mono bitmap, m_hbmMono
|
||||
// that is used to create highlights
|
||||
// of button faces.
|
||||
// m_hbmDefault hold the default bitmap if there is one.
|
||||
//
|
||||
WXHDC m_hdcMono;
|
||||
WXHBITMAP m_hbmMono;
|
||||
WXHBITMAP m_hbmDefault;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#define DEFAULTBITMAPX 16
|
||||
#define DEFAULTBITMAPY 15
|
||||
#define DEFAULTBUTTONX 24
|
||||
#define DEFAULTBUTTONY 22
|
||||
#define DEFAULTBARHEIGHT 27
|
||||
|
||||
//
|
||||
// States (not all of them currently used)
|
||||
//
|
||||
#define wxTBSTATE_CHECKED 0x01 // radio button is checked
|
||||
#define wxTBSTATE_PRESSED 0x02 // button is being depressed (any style)
|
||||
#define wxTBSTATE_ENABLED 0x04 // button is enabled
|
||||
#define wxTBSTATE_HIDDEN 0x08 // button is hidden
|
||||
#define wxTBSTATE_INDETERMINATE 0x10 // button is indeterminate
|
||||
|
||||
#endif // USE_TOOL/BUTTONBAR
|
||||
#endif
|
||||
// __TBARMSWH__
|
||||
@@ -0,0 +1,149 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: textctrl.h
|
||||
// Purpose: wxTextCtrl class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __TEXTCTRLH__
|
||||
#define __TEXTCTRLH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "textctrl.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
#if USE_IOSTREAMH
|
||||
#include <iostream.h>
|
||||
#else
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
WXDLLEXPORT_DATA(extern const char*) wxTextCtrlNameStr;
|
||||
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
||||
|
||||
// Single-line text item
|
||||
class WXDLLEXPORT wxTextCtrl: public wxControl
|
||||
|
||||
// 16-bit Borland 4.0 doesn't seem to allow multiple inheritance with wxWindow and streambuf:
|
||||
// it complains about deriving a huge class from the huge class streambuf. !!
|
||||
// Also, can't use streambuf if making or using a DLL :-(
|
||||
|
||||
#if (defined(__BORLANDC__) && !defined(__WIN32__)) || defined(__MWERKS__) || defined(_WINDLL) || defined(WXUSINGDLL) || defined(WXMAKINGDLL)
|
||||
#define NO_TEXT_WINDOW_STREAM
|
||||
#endif
|
||||
|
||||
#ifndef NO_TEXT_WINDOW_STREAM
|
||||
, public streambuf
|
||||
#endif
|
||||
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTextCtrl)
|
||||
|
||||
protected:
|
||||
wxString fileName;
|
||||
public:
|
||||
wxTextCtrl(void);
|
||||
inline wxTextCtrl(wxWindow *parent, const wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, const long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxTextCtrlNameStr)
|
||||
#ifndef NO_TEXT_WINDOW_STREAM
|
||||
:streambuf()
|
||||
#endif
|
||||
{
|
||||
Create(parent, id, value, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, const long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxTextCtrlNameStr);
|
||||
|
||||
virtual wxString GetValue(void) const ;
|
||||
virtual void SetValue(const wxString& value);
|
||||
virtual void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
// Clipboard operations
|
||||
virtual void Copy(void);
|
||||
virtual void Cut(void);
|
||||
virtual void Paste(void);
|
||||
|
||||
virtual void SetInsertionPoint(const long pos);
|
||||
virtual void SetInsertionPointEnd(void);
|
||||
virtual long GetInsertionPoint(void) const ;
|
||||
virtual long GetLastPosition(void) const ;
|
||||
virtual void Replace(const long from, const long to, const wxString& value);
|
||||
virtual void Remove(const long from, const long to);
|
||||
virtual void SetSelection(const long from, const long to);
|
||||
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
virtual void SetEditable(const bool editable);
|
||||
|
||||
#ifndef NO_TEXT_WINDOW_STREAM
|
||||
int overflow(int i);
|
||||
int sync(void);
|
||||
int underflow(void);
|
||||
#endif
|
||||
|
||||
void OnDropFiles(wxDropFilesEvent& event);
|
||||
|
||||
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);
|
||||
|
||||
virtual bool LoadFile(const wxString& file);
|
||||
virtual bool SaveFile(const wxString& file);
|
||||
virtual void WriteText(const wxString& text);
|
||||
virtual void DiscardEdits(void);
|
||||
virtual bool IsModified(void) const;
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
inline bool Modified(void) const { return IsModified(); }
|
||||
#endif
|
||||
|
||||
virtual long XYToPosition(const long x, const long y) const ;
|
||||
virtual void PositionToXY(const long pos, long *x, long *y) const ;
|
||||
virtual void ShowPosition(const long pos);
|
||||
virtual int GetLineLength(const long lineNo) const ;
|
||||
virtual wxString GetLineText(const long lineNo) const ;
|
||||
virtual int GetNumberOfLines(void) const ;
|
||||
virtual void Clear(void);
|
||||
|
||||
// Process special keys e.g. 'enter' and process as if it were a command, if required
|
||||
void OnChar(wxKeyEvent& event);
|
||||
|
||||
void OnEraseBackground(wxEraseEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual bool MSWCommand(const WXUINT param, const WXWORD id);
|
||||
inline bool IsRich(void) { return m_isRich; }
|
||||
inline void SetRichEdit(const bool isRich) { m_isRich = isRich; }
|
||||
virtual WXHBRUSH OnCtlColor(const WXHDC pDC, const WXHWND pWnd, const WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
virtual void AdoptAttributesFromHWND(void);
|
||||
virtual void SetupColours(void);
|
||||
|
||||
protected:
|
||||
bool m_isRich; // Are we using rich text edit to implement this?
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// __TEXTCTRLH__
|
||||
@@ -0,0 +1,52 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: timer.h
|
||||
// Purpose: wxTimer class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __TIMERH__
|
||||
#define __TIMERH_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "timer.h"
|
||||
#endif
|
||||
|
||||
#include "wx/object.h"
|
||||
|
||||
class WXDLLEXPORT wxTimer: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTimer)
|
||||
|
||||
public:
|
||||
bool oneShot ;
|
||||
int milli ;
|
||||
int lastMilli ;
|
||||
|
||||
long id;
|
||||
public:
|
||||
wxTimer(void);
|
||||
~wxTimer(void);
|
||||
virtual bool Start(int milliseconds = -1,bool one_shot = FALSE); // Start timer
|
||||
virtual void Stop(void); // Stop timer
|
||||
virtual void Notify(void) = 0; // Override this member
|
||||
inline int Interval(void) { return milli ; }; // Returns the current interval time (0 if stop)
|
||||
};
|
||||
|
||||
// Timer functions (milliseconds)
|
||||
void WXDLLEXPORT wxStartTimer(void);
|
||||
// Gets time since last wxStartTimer or wxGetElapsedTime
|
||||
long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE);
|
||||
|
||||
// EXPERIMENTAL: comment this out if it doesn't compile.
|
||||
bool WXDLLEXPORT wxGetLocalTime(long *timeZone, int *dstObserved);
|
||||
|
||||
// Get number of seconds since 00:00:00 GMT, Jan 1st 1970.
|
||||
long WXDLLEXPORT wxGetCurrentTime(void);
|
||||
|
||||
#endif
|
||||
// __TIMERH_
|
||||
|
After Width: | Height: | Size: 326 B |
@@ -0,0 +1,43 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wave.h
|
||||
// Purpose: wxWave class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WAVEH__
|
||||
#define __WAVEH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "wave.h"
|
||||
#endif
|
||||
|
||||
#include <wx/object.h>
|
||||
|
||||
class wxWave : public wxObject
|
||||
{
|
||||
public:
|
||||
wxWave(void);
|
||||
wxWave(const wxString& fileName, bool isResource = FALSE);
|
||||
~wxWave(void);
|
||||
|
||||
public:
|
||||
bool Create(const wxString& sFileName, bool isResource = FALSE);
|
||||
bool IsOk(void) const { return (m_waveData ? TRUE : FALSE); };
|
||||
bool Play(bool async = TRUE, bool looped = FALSE) const;
|
||||
|
||||
protected:
|
||||
bool Free(void);
|
||||
|
||||
private:
|
||||
byte* m_waveData;
|
||||
int m_waveLength;
|
||||
bool m_isResource;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// File: wx.rc
|
||||
// Purpose: wxWindows resource definitions. ALWAYS include
|
||||
// this in your application resource file.
|
||||
//
|
||||
// wxWindows version 1.50
|
||||
// Copyright (c) 1993 Artificial Intelligence Applications Institute,
|
||||
// The University of Edinburgh
|
||||
//
|
||||
// Author: Julian Smart
|
||||
// Date: 9-4-93
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software and its
|
||||
// documentation for any purpose is hereby granted without fee, provided
|
||||
// that the above copyright notice, author statement and this permission
|
||||
// notice appear in all copies of this software and related documentation.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS,
|
||||
// IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// IN NO EVENT SHALL THE ARTIFICIAL INTELLIGENCE APPLICATIONS INSTITUTE OR THE
|
||||
// UNIVERSITY OF EDINBURGH BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR
|
||||
// CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
// LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF
|
||||
// DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH
|
||||
// THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
#ifdef __GNUWIN32__
|
||||
#include <wx/msw/gnuwin32/winresrc.h>
|
||||
#else
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dummy Dialog for all wxCAPTION Dialog boxes
|
||||
//
|
||||
|
||||
wxCaptionDialog DIALOG DISCARDABLE 34, 22, 144, 75
|
||||
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Dummy dialog"
|
||||
BEGIN
|
||||
LTEXT "", -1,-2,-2,1,1 //necessary for __WATCOMC__
|
||||
END
|
||||
|
||||
//
|
||||
// Dummy dialog for dialog boxes without caption & with thin frame
|
||||
//
|
||||
wxNoCaptionDialog DIALOG 34, 22, 144, 75
|
||||
STYLE WS_POPUP
|
||||
BEGIN
|
||||
LTEXT "", -1,-2,-2,1,1 //necessary for __WATCOMC__
|
||||
END
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This is the MDI Window menu
|
||||
//
|
||||
|
||||
wxWindowMenu MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&Window"
|
||||
BEGIN
|
||||
MENUITEM "&Cascade", 4002
|
||||
MENUITEM "&Tile", 4001
|
||||
MENUITEM "&Arrange icons", 4003
|
||||
MENUITEM "&Next", 4004
|
||||
END
|
||||
END
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Standard wxWindows Cursors
|
||||
//
|
||||
|
||||
WXCURSOR_HAND CURSOR DISCARDABLE "wx/msw/hand.cur"
|
||||
WXCURSOR_BULLSEYE CURSOR DISCARDABLE "wx/msw/bullseye.cur"
|
||||
WXCURSOR_PENCIL CURSOR DISCARDABLE "wx/msw/pencil.cur"
|
||||
WXCURSOR_MAGNIFIER CURSOR DISCARDABLE "wx/msw/magnif1.cur"
|
||||
WXCURSOR_NO_ENTRY CURSOR DISCARDABLE "wx/msw/noentry.cur"
|
||||
WXCURSOR_SIZING CURSOR DISCARDABLE "wx/msw/size.cur"
|
||||
WXCURSOR_ROLLER CURSOR DISCARDABLE "wx/msw/roller.cur"
|
||||
WXCURSOR_WATCH CURSOR DISCARDABLE "wx/msw/watch1.cur"
|
||||
WXCURSOR_PBRUSH CURSOR DISCARDABLE "wx/msw/pbrush.cur"
|
||||
WXCURSOR_PLEFT CURSOR DISCARDABLE "wx/msw/pntleft.cur"
|
||||
WXCURSOR_PRIGHT CURSOR DISCARDABLE "wx/msw/pntright.cur"
|
||||
WXCURSOR_QARROW CURSOR DISCARDABLE "wx/msw/query.cur"
|
||||
WXCURSOR_BLANK CURSOR DISCARDABLE "wx/msw/blank.cur"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Default Icons
|
||||
//
|
||||
|
||||
wxDEFAULT_FRAME ICON "wx/msw/std.ico"
|
||||
wxDEFAULT_MDIPARENTFRAME ICON "wx/msw/mdi.ico"
|
||||
wxDEFAULT_MDICHILDFRAME ICON "wx/msw/child.ico"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmaps
|
||||
//
|
||||
|
||||
wxDISABLE_BUTTON_BITMAP BITMAP "wx/msw/disable.bmp"
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
rem Cygnus Gnu-Win32 environment variables
|
||||
rem Assumes that compiler and wxWindows are installed on the g: drive.
|
||||
rem
|
||||
set WXWIN=d:\wx2
|
||||
path C:\WINDOWS;C:\WINDOWS\COMMAND;g:\gnuwin32\b19\H-i386-cygwin32\bin;g:\gnuwin32\b19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cygnus-2.7.2-970404;c:\bin;g:\gnuwin32\b19\tcl\bin
|
||||
set GCC_EXEC_PREFIX=G:\gnuwin32\b19\H-i386-cygwin32\lib\gcc-lib\
|
||||
set RCINCLUDE=%WXWIN\include
|
||||
set CPLUS_INCLUDE_PATH=/g/gnuwin32/b19/h-i386-cygwin32/i386-cygwin32/include:/g/gnuwin32/b19/include/g++:/g/gnuwin32/b19/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32/cygnus-2.7.2-970404/include:/d/wx2/include:/g/gnuwin32/b19/include/g++
|
||||
set MAKE_MODE=unix
|
||||
mount G: /g
|
||||
mount D: /d
|
||||
|
||||
rem 4DOS users only...
|
||||
unalias make
|
||||
alias makegnu make -f makefile.g95
|
||||
@@ -0,0 +1,36 @@
|
||||
# Common settings for Borland 32-bit compilation (makefile.b32 files)
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
CFG = $(WXDIR)\src\msw\wxwin32.cfg
|
||||
WXLIBDIR = $(WXDIR)\lib
|
||||
WXINC = $(WXDIR)\include
|
||||
WIN95FLAG = -D__WIN95__
|
||||
|
||||
!ifndef FINAL
|
||||
FINAL=0
|
||||
!endif
|
||||
|
||||
!ifndef DEBUG
|
||||
DEBUG=1
|
||||
!endif
|
||||
|
||||
!if "$(FINAL)" == "0"
|
||||
OPT = -Od
|
||||
DEBUG_FLAGS= -v -DDEBUG=$(DEBUG) -DUSE_DEFINE
|
||||
!else
|
||||
OPT = -O2
|
||||
DEBUG_FLAGS = -DDEBUG=$(DEBUG) -DUSE_DEFINE
|
||||
!endif
|
||||
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
|
||||
|
||||
LIBTARGET= $(WXLIBDIR)\wx32.lib
|
||||
DUMMY=dummy
|
||||
|
||||
SRCSUFF = cpp
|
||||
OBJSUFF = obj
|
||||
|
||||
.$(SRCSUFF).obj:
|
||||
bcc32 $(CPPFLAGS) -c {$< }
|
||||
|
||||
.c.obj:
|
||||
bcc32 $(CPPFLAGS) -P- -c {$< }
|
||||
@@ -0,0 +1,37 @@
|
||||
# Common settings for Borland 16-bit compilation (makefile.bcc files)
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
CFG = $(WXDIR)\src\wxwin.cfg
|
||||
WXLIB = $(WXDIR)\lib
|
||||
WXINC = $(WXDIR)\include\msw
|
||||
WXBASEINC = $(WXDIR)\include\base
|
||||
|
||||
!ifndef FINAL
|
||||
FINAL=0
|
||||
!endif
|
||||
|
||||
!ifndef DEBUG
|
||||
DEBUG=0
|
||||
!endif
|
||||
|
||||
!if "$(FINAL)" == "0"
|
||||
LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
|
||||
OPT = -Od
|
||||
DEBUG_FLAGS= -v
|
||||
!else
|
||||
LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
|
||||
OPT = -O2
|
||||
DEBUG_FLAGS =
|
||||
!endif
|
||||
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
|
||||
|
||||
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
|
||||
|
||||
LIBTARGET= $(WXLIB)\wx.lib
|
||||
|
||||
SRCSUFF = cpp
|
||||
OBJSUFF = obj
|
||||
|
||||
.$(SRCSUFF).obj:
|
||||
bcc $(CPPFLAGS) -c {$< }
|
||||
@@ -0,0 +1,97 @@
|
||||
#
|
||||
# File: makefile.bcc
|
||||
# Author: Julian Smart
|
||||
# Created: 1993
|
||||
# Updated:
|
||||
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||
#
|
||||
# "%W% %G%"
|
||||
#
|
||||
# Makefile : Builds wxWindows library wx.lib for Windows 3.1
|
||||
# and Borland C++ 3.1. This makefile calls makefile.bcc in msw and
|
||||
# base subdirectories.
|
||||
|
||||
!if "$(BCCDIR)" == ""
|
||||
!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
|
||||
!endif
|
||||
|
||||
!if "$(WXWIN)" == ""
|
||||
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
|
||||
!endif
|
||||
|
||||
!ifndef DEBUG
|
||||
DEBUG=0
|
||||
!endif
|
||||
|
||||
!ifndef FINAL
|
||||
FINAL=0
|
||||
!endif
|
||||
|
||||
# Change these if needed.
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
!include $(WXDIR)\src\makebcc.env
|
||||
|
||||
!if "$(FINAL)" == "0"
|
||||
OPT = -Od
|
||||
DEBUG_FLAGS= -v /DDEBUG=$(DEBUG) # -v # -v for debugging info
|
||||
!else
|
||||
OPT = -O2
|
||||
DEBUG_FLAGS = /DDEBUG=$(DEBUG)
|
||||
!endif
|
||||
|
||||
BOR_VER = 4
|
||||
|
||||
#!if "$(BOR_VER)" == "3.1"
|
||||
#BCCDIR = d:\bc3
|
||||
#!elif "$(BOR_VER)" == "4"
|
||||
#BCCDIR = d:\bc4
|
||||
#!endif
|
||||
|
||||
WXBASEINC = $(WXDIR)\include\base
|
||||
WXINC = $(WXDIR)\include\msw
|
||||
PROLOGIOINC = $(WXDIR)\utils\prologio\src
|
||||
XPMINC=$(WXDIR)\contrib\wxxpm\libxpm.34b\lib
|
||||
|
||||
all: wxwin.cfg
|
||||
cd $(WXDIR)\src\msw
|
||||
make -f makefile.bcc -DCFG=$(CFG) -DWXDIR=$(WXDIR) DEBUG=$(DEBUG) -DDEBUG_FLAGS=$(DEBUG_FLAGS) -DOPT=$(OPT) -DFINAL=$(FINAL)
|
||||
cd $(WXDIR)\src
|
||||
|
||||
clean:
|
||||
erase wxwin.cfg
|
||||
cd $(WXDIR)\src\msw
|
||||
make -f makefile.bcc clean
|
||||
cd $(WXDIR)\src
|
||||
|
||||
wxwin.cfg: makefile.bcc
|
||||
copy &&!
|
||||
-H=$(WXDIR)\src\borland.pch
|
||||
-2
|
||||
-P
|
||||
-d
|
||||
-w-hid
|
||||
-w-par
|
||||
-w-pia
|
||||
-w-aus
|
||||
-w-rch
|
||||
-ml
|
||||
-Od
|
||||
-WE
|
||||
-Fs-
|
||||
-Vf
|
||||
-I$(WXBASEINC);$(WXINC);$(PROLOGIOINC);$(XPMINC);$(BCCDIR)\include;$(WXDIR)\contrib\fafa;$(WXDIR)\contrib\itsybits;$(WXDIR)\utils\rcparser\src
|
||||
|
||||
-L$(BCCDIR)\lib
|
||||
-Dwx_msw
|
||||
! wxwin.cfg
|
||||
!if "$(BOR_VER)" == "3.1"
|
||||
echo -Ff=4 >>wxwin.cfg
|
||||
!elif "$(BOR_VER)" == "4"
|
||||
echo -Ff=512 >>wxwin.cfg
|
||||
echo -dc >>wxwin.cfg
|
||||
!endif
|
||||
|
||||
|
||||
# -O was: -Oxt
|
||||
|
||||