// Scintilla source code edit control
/** @file Platform.h
** Interface to platform facilities. Also includes some basic utilities.
- ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows.
+ ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWidgets.
**/
// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
// PLAT_GTK = GTK+ on Linux or Win32
// PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32
// PLAT_WIN = Win32 API on Win32 OS
-// PLAT_WX is wxWindows on any supported platform
+// PLAT_WX is wxWidgets on any supported platform
#define PLAT_GTK 0
#define PLAT_GTK_WIN32 0
#endif
-#if PLAT_WX
-#include <wx/object.h> // For the global memory operators, if needed.
-#endif
-
-
// Underlying the implementation of the platform classes are platform specific types.
// Sometimes these need to be passed around by client code so they are defined here
typedef void *WindowID;
typedef void *MenuID;
typedef void *TickerID;
+typedef void *Function;
+typedef void *IdlerID;
/**
* A geometric point class.
int x;
int y;
- Point(int x_=0, int y_=0) : x(x_), y(y_) {
+ explicit Point(int x_=0, int y_=0) : x(x_), y(y_) {
}
// Other automatically defined methods (assignment, copy constructor, destructor) are fine
Font();
virtual ~Font();
- virtual void Create(const char *faceName, int characterSet, int size, bool bold, bool italic);
+ virtual void Create(const char *faceName, int characterSet, int size,
+ bool bold, bool italic, bool extraFontFlag=false);
virtual void Release();
FontID GetID() { return id; }
static ListBox *Allocate();
virtual void SetFont(Font &font)=0;
- virtual void Create(Window &parent, int ctrlID, int lineHeight_, bool unicodeMode_)=0;
+ virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_)=0;
virtual void SetAverageCharWidth(int width)=0;
virtual void SetVisibleRows(int rows)=0;
+ virtual int GetVisibleRows() const=0;
virtual PRectangle GetDesiredRect()=0;
virtual int CaretFromEdge()=0;
virtual void Clear()=0;
virtual int GetSelection()=0;
virtual int Find(const char *prefix)=0;
virtual void GetValue(int n, char *value, int len)=0;
- virtual void Sort()=0;
virtual void RegisterImage(int type, const char *xpm_data)=0;
virtual void ClearRegisteredImages()=0;
virtual void SetDoubleClickAction(CallBackAction, void *)=0;
+ virtual void SetList(const char* list, char separator, char typesep)=0;
};
/**
double Duration(bool reset=false);
};
+/**
+ * Dynamic Library (DLL/SO/...) loading
+ */
+class DynamicLibrary {
+public:
+ virtual ~DynamicLibrary() {};
+
+ /// @return Pointer to function "name", or NULL on failure.
+ virtual Function FindFunction(const char *name) = 0;
+
+ /// @return true if the library was loaded successfully.
+ virtual bool IsValid() = 0;
+
+ /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded.
+ static DynamicLibrary *Load(const char *modulePath);
+};
+
/**
* Platform class used to retrieve system wide parameters such as double click speed
* and chrome colour. Not a creatable object, more of a module with several functions.